From 4298d0b5128326621c8f537107c4c8b459490721 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 25 Feb 2014 20:37:03 +0100 Subject: core: add new RestrictAddressFamilies= switch This new unit settings allows restricting which address families are available to processes. This is an effective way to minimize the attack surface of services, by turning off entire network stacks for them. This is based on seccomp, and does not work on x86-32, since seccomp cannot filter socketcall() syscalls on that platform. --- man/systemd.exec.xml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'man/systemd.exec.xml') diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index 19839937c7..413d81d330 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -1121,6 +1121,55 @@ applied. + + RestrictAddressFamilies= + + Restricts the set of + socket address families accessible to + the processes of this unit. Takes a + space-separated list of address family + names to whitelist, such as + AF_UNIX, + AF_INET or + AF_INET6. When + prefixed with ~ + the listed address families will be + applied as blacklist, otherwise as + whitelist. Note that this restricts + access to the + socket2 + system call only. Sockets passed into + the process by other means (for + example, by using socket activation + with socket units, see + systemd.socket5) + are unaffected. Also, sockets created + with socketpair() + (which creates connected AF_UNIX + sockets only) are unaffected. Note + that this option has no effect on + 32bit x86 and is ignored (but works + correctly on x86-64). By default no + restriction applies, all address + families are accessible to + processes. If assigned the empty + string any previous list changes are + undone. + + Use this option to limit + exposure of processes to remote + systems, in particular via exotic + network protocols. Note that in most + cases the local + AF_UNIX address + family should be included in the + configured whitelist as it is + frequently used for local + communication, including for + syslog2 + logging. + + Personality= @@ -1138,6 +1187,7 @@ host system's kernel. + -- cgit v1.2.3-54-g00ecf