summaryrefslogtreecommitdiff
path: root/man/systemd.exec.xml
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-11-12 17:28:48 +0100
committerGitHub <noreply@github.com>2017-11-12 17:28:48 +0100
commitb835eeb4ec1dd122b6feff2b70881265c529fcdd (patch)
tree142441a6d10e94723e4fcb2ebb0caf711a356a00 /man/systemd.exec.xml
parentce5faeac1f79f3afefcc129025a1cec0211313fb (diff)
downloadsystemd-b835eeb4ec1dd122b6feff2b70881265c529fcdd.tar.gz
shared/seccomp: disallow pkey_mprotect the same as mprotect for W^X mappings (#7295)
MemoryDenyWriteExecution policy could be be bypassed by using pkey_mprotect instead of mprotect to create an executable writable mapping. The impact is mitigated by the fact that the man page says "Note that this feature is fully available on x86-64, and partially on x86", so hopefully people do not rely on it as a sole security measure. Found by Karin Hossen and Thomas Imbert from Sogeti ESEC R&D. https://bugs.launchpad.net/bugs/1725348
Diffstat (limited to 'man/systemd.exec.xml')
-rw-r--r--man/systemd.exec.xml5
1 files changed, 3 insertions, 2 deletions
diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml
index 7545c75d77..18cfe6b90a 100644
--- a/man/systemd.exec.xml
+++ b/man/systemd.exec.xml
@@ -1869,8 +1869,9 @@ CapabilityBoundingSet=~CAP_B CAP_C</programlisting>
memory segments as executable are prohibited. Specifically, a system call filter is added that rejects
<citerefentry><refentrytitle>mmap</refentrytitle><manvolnum>2</manvolnum></citerefentry> system calls with both
<constant>PROT_EXEC</constant> and <constant>PROT_WRITE</constant> set,
- <citerefentry><refentrytitle>mprotect</refentrytitle><manvolnum>2</manvolnum></citerefentry> system calls with
- <constant>PROT_EXEC</constant> set and
+ <citerefentry><refentrytitle>mprotect</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+ or <citerefentry><refentrytitle>pkey_mprotect</refentrytitle><manvolnum>2</manvolnum></citerefentry>
+ system calls with <constant>PROT_EXEC</constant> set and
<citerefentry><refentrytitle>shmat</refentrytitle><manvolnum>2</manvolnum></citerefentry> system calls with
<constant>SHM_EXEC</constant> set. Note that this option is incompatible with programs and libraries that
generate program code dynamically at runtime, including JIT execution engines, executable stacks, and code