Skip to content

Commit 0b3910d

Browse files
authored
Merge pull request #12 from k4yt3x/1.7
1.7
2 parents 7131835 + 7f44c4c commit 0b3910d

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

sysctl.conf

+14-5
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
# Author: K4YT3X
33
# Contributor: IceCodeNew
44
# Contributor: HorlogeSkynet
5+
# Contributor: shenzhui007
6+
# Contributor: HorlogeSkynet
57
# Date Created: October 5, 2020
6-
# Last Updated: October 15, 2021
8+
# Last Updated: August 4, 2022
79

810
# Licensed under the GNU General Public License Version 3 (GNU GPL v3),
911
# available at: https://www.gnu.org/licenses/gpl-3.0.txt
10-
# (C) 2020-2021 K4YT3X
12+
# (C) 2020-2022 K4YT3X
1113

1214
# Multiple sources have been consulted while writing this configuration
1315
# file (e.g., nixCraft's sysctl.conf). Sources are not cited since this
@@ -69,6 +71,9 @@ kernel.perf_event_paranoid = 3
6971
kernel.perf_cpu_time_max_percent = 1
7072
kernel.perf_event_max_sample_rate = 1
7173

74+
# prevent unprivileged attackers from loading vulnerable line disciplines with the TIOCSETD ioctl
75+
dev.tty.ldisc_autoload = 0
76+
7277
########## File System ##########
7378

7479
# disallow core dumping by SUID/SGID programs
@@ -110,9 +115,13 @@ fs.inotify.max_user_watches = 524288
110115
# do not allow mmap in lower addresses
111116
vm.mmap_min_addr = 65536
112117

113-
# improve mmap ASLR effectness
114-
vm.mmap_rnd_bits=32
115-
vm.mmap_rnd_compat_bits=16
118+
# improve mmap ASLR effectiveness
119+
vm.mmap_rnd_bits = 32
120+
vm.mmap_rnd_compat_bits = 16
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
116125

117126
########## Networking ##########
118127

0 commit comments

Comments
 (0)