Commit 8d3cc9c
[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.7 (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, /root, /home or /run/user.
Signed-off-by: David Härdeman <david@hardeman.nu>1 parent 92e8787 commit 8d3cc9c
1 file changed
+46
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
32 | 61 | | |
33 | 62 | | |
34 | 63 | | |
0 commit comments