]> granicus.if.org Git - procps-ng/commitdiff
misc: Add link protection examples to sysctl.conf
authorCraig Small <csmall@enc.com.au>
Sat, 3 Mar 2018 07:56:20 +0000 (18:56 +1100)
committerCraig Small <csmall@enc.com.au>
Sat, 3 Mar 2018 07:56:20 +0000 (18:56 +1100)
Adds both examples to the sample sysctl.conf configuration file
to enable link protection for both hard and soft links.

Most kernels probably have this enabled anyhow.

References:
 https://bugs.debian.org/889098
 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-18078
 https://github.com/torvalds/linux/commit/561ec64ae67ef25cac8d72bb9c4bfc955edfd415

sysctl.conf

index 6559310a14cc3c881aa4ceebf1d4b852426f72d2..e846a57d92972401711c136e3c74c13790350af0 100644 (file)
@@ -57,3 +57,8 @@ net/ipv4/icmp_echo_ignore_broadcasts =1
 # This limits PID values to 4 digits, which allows tools like ps
 # to save screen space.
 kernel/pid_max=10000
+
+# Protects against creating or following links under certain conditions
+# See https://www.kernel.org/doc/Documentation/sysctl/fs.txt
+#fs.protected_hardlinks = 1
+#fs.protected_symlinks = 1