Vulnerability record
bpf: Require prog fd or capability for cgroup detach
In the Linux kernel, the following vulnerability has been resolved:
bpf: Require prog fd or capability for cgroup detach
Since the commit below a cgroup prog detach does not require CAP_NET_ADMIN. The fd of the attached prog gives the permission instead. But the detach requires this fd only with BPF_F_ALLOW_MULTI. Without this flag a cgroup has only one prog per attach type. Then find_detach_entry() returns this prog and does not compare it with the prog of the caller. Thus the kernel detaches this prog for a caller with neither the fd nor a capability.
Compare the two progs. If they are…
Remediation
No fixed version has been published for this vulnerability yet. Check the references below for vendor advisories, workarounds and mitigation guidance.
Sources