2 .\" Copyright (C) 2017 Red Hat, Inc. All Rights Reserved.
3 .\" Written by David Howells (dhowells@redhat.com)
5 .\" %%%LICENSE_START(GPLv2+_SW_ONEPARA)
6 .\" This program is free software; you can redistribute it and/or
7 .\" modify it under the terms of the GNU General Public License
8 .\" as published by the Free Software Foundation; either version
9 .\" 2 of the License, or (at your option) any later version.
12 .TH KERNEL_LOCKDOWN 7 2021-06-20 Linux "Linux Programmer's Manual"
14 kernel_lockdown \- kernel image access prevention feature
16 The Kernel Lockdown feature is designed to prevent both direct and indirect
17 access to a running kernel image, attempting to protect against unauthorized
18 modification of the kernel image and to prevent access to security and
19 cryptographic data located in kernel memory, whilst still permitting driver
22 If a prohibited or restricted feature is accessed or used, the kernel will emit
23 a message that looks like:
26 Lockdown: X: Y is restricted, see man kernel_lockdown.7
29 where X indicates the process name and Y indicates what is restricted.
31 On an EFI-enabled x86 or arm64 machine, lockdown will be automatically enabled
32 if the system boots in EFI Secure Boot mode.
35 When lockdown is in effect, a number of features are disabled or have their
37 This includes special device files and kernel services that allow
38 direct access of the kernel image:
54 and the ability to directly configure and control devices, so as to prevent
55 the use of a device to access or modify a kernel image:
57 The use of module parameters that directly specify hardware parameters to
58 drivers through the kernel command line or when loading a module.
60 The use of direct PCI BAR access.
62 The use of the ioperm and iopl instructions on x86.
64 The use of the KD*IO console ioctls.
66 The use of the TIOCSSERIAL serial ioctl.
68 The alteration of MSR registers on x86.
70 The replacement of the PCMCIA CIS.
72 The overriding of ACPI tables.
74 The use of ACPI error injection.
76 The specification of the ACPI RDSP address.
78 The use of ACPI custom methods.
80 Certain facilities are restricted:
82 Only validly signed modules may be loaded (waived if the module file being
83 loaded is vouched for by IMA appraisal).
85 Only validly signed binaries may be kexec'd (waived if the binary image file
86 to be executed is vouched for by IMA appraisal).
88 Unencrypted hibernation/suspend to swap are disallowed as the kernel image is
89 saved to a medium that can then be accessed.
91 Use of debugfs is not permitted as this allows a whole range of actions
92 including direct configuration of, access to and driving of hardware.
94 IMA requires the addition of the "secure_boot" rules to the policy,
95 whether or not they are specified on the command line,
96 for both the built-in and custom policies in secure boot lockdown mode.
98 The Kernel Lockdown feature was added in Linux 5.4.
100 The Kernel Lockdown feature is enabled by CONFIG_SECURITY_LOCKDOWN_LSM.
103 command line parameter controls the sequence of the initialization of
104 Linux Security Modules.
105 It must contain the string
107 to enable the Kernel Lockdown feature.
108 If the command line parameter is not specified,
109 the initialization falls back to the value of the deprecated
111 command line parameter and further to the value of CONFIG_LSM.
112 .\" commit 000d388ed3bbed745f366ce71b2bb7c2ee70f449