Skip to content
HighOS hardeningBLWK-KERNEL-006

Unprivileged users can load BPF programs into the kernel ​

What this means ​

kernel.unprivileged_bpf_disabled is 0 — any local user can load BPF programs into the kernel without CAP_SYS_ADMIN. The BPF verifier has been the source of numerous local privilege-escalation CVEs; this setting is what determines whether that class of bug is reachable by an unprivileged attacker at all.

How to fix it ​

Set kernel.unprivileged_bpf_disabled=1 via /etc/sysctl.d/ and run sysctl --system.

Check it yourself ​

Run a scan and look for BLWK-KERNEL-006 in the results:

sh
bulwark scan

Installed the standalone CLI package instead of the app? The command is bulwarkctl.

How Bulwark decides

Bulwark reads sysctl_kernel and reports this check when:

text
unprivileged_bpf_disabled == 0

If a value can't be read, Bulwark reports the check as undetermined rather than passing it. View the rule source.

References ​

Released under the Apache License 2.0.