public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH] sysctl.conf: Turn on BPF JIT hardening, if the JIT is enabled
@ 2020-06-07 17:02 Peter Müller
  2020-06-08  9:07 ` Michael Tremer
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Müller @ 2020-06-07 17:02 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 865 bytes --]

This is recommended by the Kernel Self Protection Project, and although
we do not take advantage of the BPF JIT at this time, we should set this
nevertheless in order to avoid potential security vulnerabilities.

Fixes: #12384

Signed-off-by: Peter Müller <peter.mueller(a)ipfire.org>
---
 config/etc/sysctl.conf | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/config/etc/sysctl.conf b/config/etc/sysctl.conf
index 7e7ebee44..3f4c828f9 100644
--- a/config/etc/sysctl.conf
+++ b/config/etc/sysctl.conf
@@ -49,6 +49,9 @@ kernel.dmesg_restrict = 1
 fs.protected_symlinks = 1
 fs.protected_hardlinks = 1
 
+# Turn on BPF JIT hardening, if the JIT is enabled.
+net.core.bpf_jit_harden = 2
+
 # Minimal preemption granularity for CPU-bound tasks:
 # (default: 1 msec#  (1 + ilog(ncpus)), units: nanoseconds)
 kernel.sched_min_granularity_ns = 10000000
-- 
2.26.2

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-06 10:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-07 17:02 [PATCH] sysctl.conf: Turn on BPF JIT hardening, if the JIT is enabled Peter Müller
2020-06-08  9:07 ` Michael Tremer
2020-06-09 18:00   ` Peter Müller
2021-04-02 19:37     ` Peter Müller
2021-04-06 10:10       ` Michael Tremer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox