Skip to content

Commit d700828

Browse files
esnowbergvijay-suman
authored andcommitted
lockdown: Run in lockdown integrity mode when SB is enabled.
Run in lockdown integrity mode when UEFI Secure Boot is enabled. The lockdown command line parameter can still be used to raise the lockdown level higher. Orabug: 34304810 Signed-off-by: Eric Snowberg <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]>
1 parent 2450fc0 commit d700828

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

security/lockdown/lockdown.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/export.h>
1515
#include <linux/lsm_hooks.h>
1616
#include <uapi/linux/lsm.h>
17+
#include <linux/efi.h>
1718

1819
static enum lockdown_reason kernel_locked_down;
1920

@@ -88,6 +89,9 @@ static int __init lockdown_lsm_init(void)
8889
#elif defined(CONFIG_LOCK_DOWN_KERNEL_FORCE_CONFIDENTIALITY)
8990
lock_kernel_down("Kernel configuration", LOCKDOWN_CONFIDENTIALITY_MAX);
9091
#endif
92+
if (efi_enabled(EFI_SECURE_BOOT))
93+
lock_kernel_down("EFI Secure Boot", LOCKDOWN_INTEGRITY_MAX);
94+
9195
security_add_hooks(lockdown_hooks, ARRAY_SIZE(lockdown_hooks),
9296
&lockdown_lsmid);
9397
return 0;

0 commit comments

Comments
 (0)