File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ CONFIG_STACKPROTECTOR_STRONG=y
3939CONFIG_STRICT_DEVMEM=y
4040CONFIG_IO_STRICT_DEVMEM=y
4141
42+ # Do not allow manipulation of read-only memory through /proc/$pid/mem.
43+ # See also "proc_mem.force_override" sysctl below.
44+ CONFIG_PROC_MEM_NO_FORCE=y
45+
4246# Provides some protections against SYN flooding.
4347CONFIG_SYN_COOKIES=y
4448
@@ -87,6 +91,7 @@ CONFIG_HARDENED_USERCOPY=y
8791# Randomize allocator freelists, harden metadata.
8892CONFIG_SLAB_FREELIST_RANDOM=y
8993CONFIG_SLAB_FREELIST_HARDENED=y
94+ CONFIG_SLAB_BUCKETS=y
9095CONFIG_RANDOM_KMALLOC_CACHES=y
9196
9297# Make cross-slab heap attacks not as trivial when object sizes are the same. (Same as slab_nomerge boot param.)
@@ -530,6 +535,10 @@ kernel.oops_limit = 1
530535# Turn on BPF JIT hardening, if the JIT is enabled.
531536net.core.bpf_jit_harden = 2
532537
538+ # Disable bypassing of read-only permissions via /proc/$pid/mem.
539+ # To allow ptrace to do it (gdb, etc), use "...=ptrace".
540+ proc_mem.force_override=never
541+
533542# Disable dangerous userfaultfd usage.
534543vm.unprivileged_userfaultfd = 0
535544
You can’t perform that action at this time.
0 commit comments