Skip to content

Commit b5bb4cd

Browse files
Flavio Ceolinnashif
authored andcommitted
doc: security: Add hardening tool information
Add basic reference to hardening tool. Signed-off-by: Flavio Ceolin <[email protected]>
1 parent 8ec53cf commit b5bb4cd

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

doc/application/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,6 +1199,7 @@ See :ref:`setting_configuration_values` for detailed documentation on setting
11991199
Kconfig configuration values. The :ref:`initial-conf` section on the same page
12001200
explains how the initial configuration is derived. See
12011201
:ref:`configuration_options` for a complete list of configuration options.
1202+
See :ref:`hardening` for security information related with Kconfig options.
12021203

12031204
The other pages in the :ref:`Kconfig section of the manual <kconfig>` are also
12041205
worth going through, especially if you planning to add new configuration

doc/security/hardening-tool.rst

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
.. _hardening:
2+
3+
Hardening Tool
4+
##############
5+
6+
Zephyr contains several optional features that make the overall system
7+
more secure. As we take advantage of hardware features, many of these
8+
options are platform specific and besides it, some of them are unknown
9+
by developers.
10+
11+
To address this problem, Zephyr provides a tool that helps to check an
12+
application configuration option list against a list of hardening
13+
preferences defined by the **Security Group**. The tool can identify the build
14+
target and based on that provides suggestions and recommendations on how to
15+
optimize the configuration for security.
16+
17+
Usage
18+
*****
19+
20+
After configure of your application, change directory to the build folder and:
21+
22+
.. code-block:: console
23+
24+
# ninja build system:
25+
$ ninja hardenconfig
26+
# make build system:
27+
$ make hardenconfig
28+
29+
The output should be similar to the one bellow:
30+
31+
.. code-block:: console
32+
33+
34+
name | current | recommended || check result
35+
===================================================================================================================
36+
CONFIG_HW_STACK_PROTECTION | n | y || FAIL
37+
CONFIG_BOOT_BANNER | y | n || FAIL
38+
CONFIG_PRINTK | y | n || FAIL
39+
CONFIG_EARLY_CONSOLE | y | n || FAIL
40+
CONFIG_OVERRIDE_FRAME_POINTER_DEFAULT | n | y || FAIL
41+
CONFIG_DEBUG_INFO | y | n || FAIL
42+
CONFIG_TEST_RANDOM_GENERATOR | y | n || FAIL
43+
CONFIG_BUILD_OUTPUT_STRIPPED | n | y || FAIL
44+
CONFIG_STACK_SENTINEL | n | y || FAIL

doc/security/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ for ensuring security is addressed within the Zephyr project.
1313
security-overview.rst
1414
secure-coding.rst
1515
sensor-threat.rst
16+
hardening-tool.rst

0 commit comments

Comments
 (0)