| 1 |
.\" |
| 2 |
.\" Copyright 2017, Red Hat, Inc. |
| 3 |
.\" Copyright, the authors of the Linux man-pages project |
| 4 |
.\" |
| 5 |
.\" SPDX-License-Identifier: GPL-2.0-or-later |
| 6 |
.\" |
| 7 |
.TH kernel_lockdown 7 2026-02-10 "Linux man-pages 6.18" |
| 8 |
.SH NAME |
| 9 |
kernel_lockdown \- kernel image access prevention feature |
| 10 |
.SH DESCRIPTION |
| 11 |
The Kernel Lockdown feature is designed to prevent both direct and indirect |
| 12 |
access to a running kernel image, attempting to protect against unauthorized |
| 13 |
modification of the kernel image and to prevent access to security and |
| 14 |
cryptographic data located in kernel memory, whilst still permitting driver |
| 15 |
modules to be loaded. |
| 16 |
.P |
| 17 |
If a prohibited or restricted feature is accessed or used, the kernel will emit |
| 18 |
a message that looks like: |
| 19 |
.P |
| 20 |
.in +4n |
| 21 |
.EX |
| 22 |
Lockdown: X: Y is restricted, see man kernel_lockdown.7 |
| 23 |
.EE |
| 24 |
.in |
| 25 |
.P |
| 26 |
where X indicates the process name and Y indicates what is restricted. |
| 27 |
.\" |
| 28 |
.SS Coverage |
| 29 |
When lockdown is in effect, a number of features are disabled or have their |
| 30 |
use restricted. |
| 31 |
This includes special device files and kernel services that allow |
| 32 |
direct access of the kernel image: |
| 33 |
.P |
| 34 |
.RS |
| 35 |
/dev/mem |
| 36 |
.br |
| 37 |
/dev/kmem |
| 38 |
.br |
| 39 |
/dev/kcore |
| 40 |
.br |
| 41 |
/dev/ioports |
| 42 |
.br |
| 43 |
BPF |
| 44 |
.br |
| 45 |
kprobes |
| 46 |
.RE |
| 47 |
.P |
| 48 |
and the ability to directly configure and control devices, so as to prevent |
| 49 |
the use of a device to access or modify a kernel image: |
| 50 |
.IP \[bu] 3 |
| 51 |
The use of module parameters that directly specify hardware parameters to |
| 52 |
drivers through the kernel command line or when loading a module. |
| 53 |
.IP \[bu] |
| 54 |
The use of direct PCI BAR access. |
| 55 |
.IP \[bu] |
| 56 |
The use of the ioperm and iopl instructions on x86. |
| 57 |
.IP \[bu] |
| 58 |
The use of the KD*IO console ioctls. |
| 59 |
.IP \[bu] |
| 60 |
The use of the TIOCSSERIAL serial ioctl. |
| 61 |
.IP \[bu] |
| 62 |
The alteration of MSR registers on x86. |
| 63 |
.IP \[bu] |
| 64 |
The replacement of the PCMCIA CIS. |
| 65 |
.IP \[bu] |
| 66 |
The overriding of ACPI tables. |
| 67 |
.IP \[bu] |
| 68 |
The use of ACPI error injection. |
| 69 |
.IP \[bu] |
| 70 |
The specification of the ACPI RDSP address. |
| 71 |
.IP \[bu] |
| 72 |
The use of ACPI custom methods. |
| 73 |
.P |
| 74 |
Certain facilities are restricted: |
| 75 |
.IP \[bu] 3 |
| 76 |
Only validly signed modules may be loaded (waived if the module file being |
| 77 |
loaded is vouched for by IMA appraisal). |
| 78 |
.IP \[bu] |
| 79 |
Only validly signed binaries may be kexec'd (waived if the binary image file |
| 80 |
to be executed is vouched for by IMA appraisal). |
| 81 |
.IP \[bu] |
| 82 |
Unencrypted hibernation/suspend to swap are disallowed as the kernel image is |
| 83 |
saved to a medium that can then be accessed. |
| 84 |
.IP \[bu] |
| 85 |
Use of debugfs is not permitted as this allows a whole range of actions |
| 86 |
including direct configuration of, access to and driving of hardware. |
| 87 |
.IP \[bu] |
| 88 |
IMA requires the addition of the "secure_boot" rules to the policy, |
| 89 |
whether or not they are specified on the command line, |
| 90 |
for both the built-in and custom policies in secure boot lockdown mode. |
| 91 |
.SH VERSIONS |
| 92 |
The Kernel Lockdown feature was added in Linux 5.4. |
| 93 |
.SH NOTES |
| 94 |
The Kernel Lockdown feature is enabled by CONFIG_SECURITY_LOCKDOWN_LSM. |
| 95 |
The |
| 96 |
.I lsm=lsm1,...,lsmN |
| 97 |
command line parameter controls the sequence of the initialization of |
| 98 |
Linux Security Modules. |
| 99 |
It must contain the string |
| 100 |
.I lockdown |
| 101 |
to enable the Kernel Lockdown feature. |
| 102 |
If the command line parameter is not specified, |
| 103 |
the initialization falls back to the value of the deprecated |
| 104 |
.I security= |
| 105 |
command line parameter and further to the value of CONFIG_LSM. |
| 106 |
.\" commit 000d388ed3bbed745f366ce71b2bb7c2ee70f449 |