Skip to content

Commit 7fcb91d

Browse files
nathanchancekees
authored andcommitted
configs/hardening: Disable CONFIG_UBSAN_SIGNED_WRAP
kernel/configs/hardening.config turns on UBSAN for the bounds sanitizer, as that in combination with trapping can stop the exploitation of buffer overflows within the kernel. At the same time, hardening.config turns off every other UBSAN sanitizer because trapping means all UBSAN reports will be fatal and the problems brought up by other sanitizers generally do not have security implications. The signed integer overflow sanitizer was recently added back to the kernel and it is default on with just CONFIG_UBSAN=y, meaning that it gets enabled when merging hardening.config into another configuration. While this sanitizer does have security implications like the array bounds sanitizer, work to clean up enough instances to allow this to run in production environments is still ramping up, which means regular users and testers may be broken by these instances with CONFIG_UBSAN_TRAP=y. Disable CONFIG_UBSAN_SIGNED_WRAP in hardening.config to avoid this situation. Fixes: 557f8c5 ("ubsan: Reintroduce signed overflow sanitizer") Signed-off-by: Nathan Chancellor <[email protected]> Link: https://lore.kernel.org/r/20240411-fix-ubsan-in-hardening-config-v1-2-e0177c80ffaa@kernel.org Signed-off-by: Kees Cook <[email protected]>
1 parent e048d66 commit 7fcb91d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/configs/hardening.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ CONFIG_UBSAN_BOUNDS=y
4141
# CONFIG_UBSAN_SHIFT is not set
4242
# CONFIG_UBSAN_DIV_ZERO is not set
4343
# CONFIG_UBSAN_UNREACHABLE is not set
44+
# CONFIG_UBSAN_SIGNED_WRAP is not set
4445
# CONFIG_UBSAN_BOOL is not set
4546
# CONFIG_UBSAN_ENUM is not set
4647
# CONFIG_UBSAN_ALIGNMENT is not set

0 commit comments

Comments
 (0)