You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge: CVE-2025-1272: security: Re-enable lockdown LSM in some setup_arch()
MR: https://gitlab.com/redhat/rhel/src/kernel/rhel-9/-/merge_requests/3406
JIRA: https://issues.redhat.com/browse/RHEL-78974
CVE: CVE-2025-1272
Upstream Status: RHEL-only
Restore the functionality of the lockdown LSM routines in the
architecture-specific setup_arch() routines for x86, s390,
powerpc, and arm64.
Calls to the LSM lockdown routines security_lock_kernel_down() and
security_locked_down() are ineffective prior to a call to
early_security_init(). And commit 77b644c ("init/main.c:
Initialize early LSMs after arch code, static keys and calls")
moved the call to early_security_init() in start_kernel()
from before the call to setup_arch() to after it.
Secondly, even if lock_kernel_down() is called directly, e.g. via
the kernel parameter lockdown, or CONFIG_LOCK_DOWN_KERNEL_FORCE_*,
security_locked_down() will return false until early_security_init()
is called. An example of such an early call occurs in
acpi_table_upgrade() if CONFIG_ACPI_TABLE_UPGRADE is enabled.
Fix this by calling early_security_init() in the arch-specifc
setup_arch() routines that depend on early enablement of the
lockdown LSM.
First, make it safe to call early_security_init() more than once.
All subsequent calls do nothing.
Then add a call to early_security_init() into the x86, s390,
powerpc, and arm64 versions of setup_arch(). Both static_call_init()
and jump_table_init() are prerequisites for early_security_init().
So add or move them accordingly. All three of these routines
can be safely called more than once.
Tested: Kernel lockdown tested on x86_64, s390x, ppc64le, and arm64.
Fixes: 77b644c ("init/main.c: Initialize early LSMs after arch code, static keys and calls")
v2:
- Added arm64 setup_arch() because it calls acpi_table_upgrade()
Signed-off-by: Lenny Szubowicz <[email protected]>
Approved-by: Ondrej Mosnáček <[email protected]>
Approved-by: Mark Langsdorf <[email protected]>
Approved-by: Steve Best <[email protected]>
Approved-by: CKI KWF Bot <[email protected]>
Merged-by: CKI KWF Bot <[email protected]>
0 commit comments