mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 11:06:41 -05:00
Merge tag 'hardening-v6.10-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull hardening fixes from Kees Cook: - loadpin: Prevent SECURITY_LOADPIN_ENFORCE=y without module decompression (Stephen Boyd) - ubsan: Restore dependency on ARCH_HAS_UBSAN - kunit/fortify: Fix memcmp() test to be amplitude agnostic * tag 'hardening-v6.10-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: kunit/fortify: Fix memcmp() test to be amplitude agnostic ubsan: Restore dependency on ARCH_HAS_UBSAN loadpin: Prevent SECURITY_LOADPIN_ENFORCE=y without module decompression
This commit is contained in:
@@ -4,6 +4,7 @@ config ARCH_HAS_UBSAN
|
||||
|
||||
menuconfig UBSAN
|
||||
bool "Undefined behaviour sanity checker"
|
||||
depends on ARCH_HAS_UBSAN
|
||||
help
|
||||
This option enables the Undefined Behaviour sanity checker.
|
||||
Compile-time instrumentation is used to detect various undefined
|
||||
|
||||
@@ -990,7 +990,7 @@ static void fortify_test_memcmp(struct kunit *test)
|
||||
KUNIT_ASSERT_EQ(test, memcmp(one, two, one_len), 0);
|
||||
KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0);
|
||||
/* Still in bounds, but no longer matching. */
|
||||
KUNIT_ASSERT_EQ(test, memcmp(one, two, one_len + 1), -32);
|
||||
KUNIT_ASSERT_LT(test, memcmp(one, two, one_len + 1), 0);
|
||||
KUNIT_EXPECT_EQ(test, fortify_read_overflows, 0);
|
||||
|
||||
/* Catch too-large ranges. */
|
||||
|
||||
@@ -14,6 +14,9 @@ config SECURITY_LOADPIN
|
||||
config SECURITY_LOADPIN_ENFORCE
|
||||
bool "Enforce LoadPin at boot"
|
||||
depends on SECURITY_LOADPIN
|
||||
# Module compression breaks LoadPin unless modules are decompressed in
|
||||
# the kernel.
|
||||
depends on !MODULES || (MODULE_COMPRESS_NONE || MODULE_DECOMPRESS)
|
||||
help
|
||||
If selected, LoadPin will enforce pinning at boot. If not
|
||||
selected, it can be enabled at boot with the kernel parameter
|
||||
|
||||
Reference in New Issue
Block a user