Gentoo Archives: gentoo-dev

From: "Toralf Förster" <toralf@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Vanilla sources
Date: Fri, 03 Jan 2020 14:49:04
Message-Id: c2dbdb38-4a3b-2e35-4a95-2fad4efacdfa@gentoo.org
In Reply to: Re: [gentoo-dev] Vanilla sources by Rich Freeman
1 On 1/3/20 3:46 PM, Rich Freeman wrote:
2 > If OpenRC contains a vulnerability wouldn't it make more sense to set
3 > this as part of OpenRC,
4 Indeed.
5
6 Furthermore there's a nifty page https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project/Recommended_Settings
7 which yields for me to this /etc/sysctl.d/local.conf :
8
9
10 # Restrict potential illegal access via links
11 #
12 fs.protected_hardlinks = 1
13 fs.protected_symlinks = 1
14
15 #
16 # https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project#CONFIGs
17 #
18
19 # Try to keep kernel address exposures out of various /proc files (kallsyms, modules, etc).
20 kernel.kptr_restrict = 1
21
22 # Avoid kernel memory address exposures via dmesg.
23 kernel.dmesg_restrict = 1
24
25 # Block non-uid-0 profiling (needs distro patch, otherwise this is the same as "= 2")
26 kernel.perf_event_paranoid = 3
27
28 # Turn off kexec, even if it's built in.
29 kernel.kexec_load_disabled = 1
30
31 # Avoid non-ancestor ptrace access to running processes and their credentials.
32 kernel.yama.ptrace_scope = 1
33
34 # Disable User Namespaces, as it opens up a large attack surface to unprivileged users.
35 user.max_user_namespaces = 0
36
37 # Turn off unprivileged eBPF access.
38 kernel.unprivileged_bpf_disabled = 1
39
40 # Turn on BPF JIT hardening, if the JIT is enabled.
41 net.core.bpf_jit_harden = 2
42
43
44 --
45 Toralf
46 PGP 23217DA7 9B888F45

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Vanilla sources Michael 'veremitz' Everitt <gentoo@×××××××.xyz>
Re: [gentoo-dev] Vanilla sources "Hanno Böck" <hanno@g.o>