diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml index 9351c6ec52..bb28debbf2 100644 --- a/man/systemd-system.conf.xml +++ b/man/systemd-system.conf.xml @@ -553,6 +553,10 @@ shared libraries (mmap_file), and write-to-execute transitions such as JIT compilation (file_mprotect). + The policy also enforces W^X system-wide: no mapping may be writable and executable at the + same time, and a private file mapping that has been modified through copy-on-write may not be made + executable afterwards. + Since v262, files on overlayfs mounts are resolved to the layer that hosts their data, so execution from an overlay whose data resides on a signed dm-verity device is permitted, while files in a writable upper layer are denied. This requires kernel v7.2 or newer; on older kernels execution from @@ -561,13 +565,11 @@ btrfs are unsupported. Note that, without further measures to secure the system, kexec can be used to circumvent - this. Writable and executable memory mappings can also be used to circumvent this, so they need to - be blocked, which can be achieved using other LSMs, or on a per-service basis by using the - MemoryDenyWriteExecute= setting. + this. This requires the kernel to be booted with dm_verity.require_signatures=1 - on the kernel command line and with BPF LSM enabled (lsm=...,bpf). If either - prerequisite is not met, PID 1 will refuse to complete startup. + and proc_mem.force_override=never on the kernel command line, and with BPF LSM + enabled (lsm=...,bpf). The value yes is equivalent to exec. Additional modes may be added in the future.