Skip to content

Commit 4c56d9f

Browse files
committed
configs/hardening: Enable CONFIG_KSTACK_ERASE
Since we can wipe the stack with both Clang and GCC plugins, enable this for the "hardening.config" for wider testing. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kees Cook <[email protected]>
1 parent 76261fc commit 4c56d9f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kernel/configs/hardening.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
6363
# Initialize all stack variables to zero on function entry.
6464
CONFIG_INIT_STACK_ALL_ZERO=y
6565

66+
# Wipe kernel stack after syscall completion to reduce stale data lifetime.
67+
CONFIG_KSTACK_ERASE=y
68+
6669
# Wipe RAM at reboot via EFI. For more details, see:
6770
# https://trustedcomputinggroup.org/resource/pc-client-work-group-platform-reset-attack-mitigation-specification/
6871
# https://bugzilla.redhat.com/show_bug.cgi?id=1532058

0 commit comments

Comments
 (0)