Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

configs/hardening: Enable CONFIG_INIT_ON_FREE_DEFAULT_ON

To reduce stale data lifetimes, enable CONFIG_INIT_ON_FREE_DEFAULT_ON as
well. This matches the addition of CONFIG_STACKLEAK=y, which is doing
similar for stack memory.

Link: https://lore.kernel.org/r/20250717232519.2984886-13-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>

Kees Cook 437641a7 4c56d9f7

+3
+3
kernel/configs/hardening.config
··· 60 60 # Initialize all heap variables to zero on allocation. 61 61 CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y 62 62 63 + # Initialize all heap variables to zero on free to reduce stale data lifetime. 64 + CONFIG_INIT_ON_FREE_DEFAULT_ON=y 65 + 63 66 # Initialize all stack variables to zero on function entry. 64 67 CONFIG_INIT_STACK_ALL_ZERO=y 65 68