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