zero-init structs passed by reference (strong)
configname: CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF
Initialize kernel stack variables at function entry
└─>zero-init structs passed by reference (strong)
In linux kernel since version 5.1 (release Date: 2019-05-05)
Zero-initialize any structures on the stack that may
be passed by reference and had not already been
explicitly initialized. This can prevent most classes
of uninitialized stack variable exploits and information
exposures, like CVE-2017-1000410:
https://git.kernel.org/linus/06e7e776ca4d3654
As a side-effect, this keeps a lot of variables on the
stack that can otherwise be optimized out, so combining
this with CONFIG_KASAN_STACK can lead to a stack overflow
and is disallowed.
be passed by reference and had not already been
explicitly initialized. This can prevent most classes
of uninitialized stack variable exploits and information
exposures, like CVE-2017-1000410:
https://git.kernel.org/linus/06e7e776ca4d3654
As a side-effect, this keeps a lot of variables on the
stack that can otherwise be optimized out, so combining
this with CONFIG_KASAN_STACK can lead to a stack overflow
and is disallowed.
depends
CONFIG_GCC_PLUGINSNOT CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO
NOT CONFIG_KASAN or NOT CONFIG_KASAN_STACK