Skip to content

zero-init everything passed by reference

An XCCDF Rule

Description

Zero-initialize any stack variables that may be passed by reference and had not already been explicitly initialized. This configuration is available from kernel 4.14, but may be available if backported by distros. The configuration that was used to build kernel is available at /boot/config-*. To check the configuration value for CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL, run the following command: grep CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL /boot/config-* For each kernel installed, a line with value "y" should be returned.

warning alert: Warning

There is no remediation for this besides re-compiling the kernel with the appropriate value for the config.

Rationale

This eliminates all classes of uninitialized stack variable exploits and information exposures.

ID
xccdf_org.ssgproject.content_rule_kernel_config_gcc_plugin_structleak_byref_all
Severity
Medium
References
Updated