mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-11-11 21:31:43 +00:00
On 4.9.x and 4.14.x kernels ebpf verifier bugs allow ebpf programs to access (read/write) random memory. Setting kernel.unprivileged_bpf_disabled=1 mitigates this somewhat until it is fixed upstream. See: - https://lwn.net/Articles/742170 - https://lwn.net/Articles/742169 Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
32 lines
989 B
Plaintext
32 lines
989 B
Plaintext
# from Alpine defaults
|
|
net.ipv4.tcp_syncookies = 1
|
|
net.ipv4.conf.default.rp_filter = 1
|
|
net.ipv4.conf.all.rp_filter = 1
|
|
net.ipv4.ping_group_range=999 59999
|
|
# general limits
|
|
vm.max_map_count = 262144
|
|
vm.overcommit_memory = 1
|
|
net.core.somaxconn = 1024
|
|
net.ipv4.neigh.default.gc_thresh1 = 30000
|
|
net.ipv4.neigh.default.gc_thresh2 = 32000
|
|
net.ipv4.neigh.default.gc_thresh3 = 32768
|
|
fs.aio-max-nr = 1048576
|
|
fs.inotify.max_user_watches = 524288
|
|
fs.file-max = 524288
|
|
# for rngd
|
|
kernel.random.write_wakeup_threshold = 3072
|
|
# security restrictions
|
|
kernel.kptr_restrict = 2
|
|
net.ipv4.conf.all.send_redirects = 0
|
|
net.ipv4.conf.default.accept_redirects = 0
|
|
net.ipv4.conf.default.accept_source_route = 0
|
|
net.ipv6.conf.all.accept_redirects = 0
|
|
net.ipv6.conf.default.accept_redirects = 0
|
|
kernel.dmesg_restrict = 1
|
|
kernel.perf_event_paranoid = 3
|
|
fs.protected_hardlinks = 1
|
|
fs.protected_symlinks = 1
|
|
# Prevent ebpf privilege escalation
|
|
# see: https://lwn.net/Articles/742170
|
|
kernel.unprivileged_bpf_disabled=1
|