Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gssproxy] Harden systemd .service file
Most of the configuration options should be straightforward. The previous version of the .service file contained a comment that NoNewPrivileges=yes breaks the ability to open a socket under /var/lib/gssproxy. That does not appear to be correct because ProtectClock=yes was already set, which enables NoNewPrivileges. Furthermore, the comment for ProtectKernelTunables also appears to be incorrect, because it doesn't make all of /proc read-only (it's only /proc/sys/, /sys/, /proc/sysrq-trigger, /proc/latency_stats, /proc/acpi, /proc/timer_stats, /proc/fs and /proc/irq, see man systemd.exec(5)), so /proc/net/rpc/use-gss-proxy is still writeable. Perhaps it was a mixup with ProtectProc? With this applied, the "systemd-analyze security gssproxy" score goes from 8.4 (EXPOSED) to 1.6 (OK). Tested with nfs-kernel-server, some more testing in other scenarios might still be necessary. Also, note that this expects all RW data to be stored under /var/lib/gssproxy. Signed-off-by: David Härdeman <[email protected]>
- Loading branch information