|
2 | 2 | # Author: K4YT3X
|
3 | 3 | # Contributor: IceCodeNew
|
4 | 4 | # Contributor: HorlogeSkynet
|
| 5 | +# Contributor: shenzhui007 |
| 6 | +# Contributor: HorlogeSkynet |
5 | 7 | # Date Created: October 5, 2020
|
6 |
| -# Last Updated: October 15, 2021 |
| 8 | +# Last Updated: August 4, 2022 |
7 | 9 |
|
8 | 10 | # Licensed under the GNU General Public License Version 3 (GNU GPL v3),
|
9 | 11 | # available at: https://www.gnu.org/licenses/gpl-3.0.txt
|
10 |
| -# (C) 2020-2021 K4YT3X |
| 12 | +# (C) 2020-2022 K4YT3X |
11 | 13 |
|
12 | 14 | # Multiple sources have been consulted while writing this configuration
|
13 | 15 | # file (e.g., nixCraft's sysctl.conf). Sources are not cited since this
|
@@ -69,6 +71,9 @@ kernel.perf_event_paranoid = 3
|
69 | 71 | kernel.perf_cpu_time_max_percent = 1
|
70 | 72 | kernel.perf_event_max_sample_rate = 1
|
71 | 73 |
|
| 74 | +# prevent unprivileged attackers from loading vulnerable line disciplines with the TIOCSETD ioctl |
| 75 | +dev.tty.ldisc_autoload = 0 |
| 76 | + |
72 | 77 | ########## File System ##########
|
73 | 78 |
|
74 | 79 | # disallow core dumping by SUID/SGID programs
|
@@ -114,6 +119,10 @@ vm.mmap_min_addr = 65536
|
114 | 119 | vm.mmap_rnd_bits=32
|
115 | 120 | vm.mmap_rnd_compat_bits=16
|
116 | 121 |
|
| 122 | +# prevent unprivileged users from accessing userfaultfd |
| 123 | +# restricts syscall to the privileged users or the CAP_SYS_PTRACE capability |
| 124 | +vm.unprivileged_userfaultfd = 0 |
| 125 | + |
117 | 126 | ########## Networking ##########
|
118 | 127 |
|
119 | 128 | # increase the maximum length of processor input queues
|
@@ -288,10 +297,3 @@ net.ipv6.conf.all.accept_source_route = 0
|
288 | 297 | #net.ipv6.icmp.echo_ignore_all = 1
|
289 | 298 | #net.ipv6.icmp.echo_ignore_anycast = 1
|
290 | 299 | #net.ipv6.icmp.echo_ignore_multicast = 1
|
291 |
| - |
292 |
| - |
293 |
| -# prevent unprivileged attackers from loading vulnerable line disciplines with the TIOCSETD ioctl |
294 |
| -dev.tty.ldisc_autoload = 0 |
295 |
| - |
296 |
| -# disable syscall to the CAP_SYS_PTRACE capability |
297 |
| -vm.unprivileged_userfaultfd = 0 |
|
0 commit comments