AZL-118676: CVE-2026-143362 affecting package kernel 6.6.161.1-1
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 CAPNETADMIN. The fd of the attached prog gives the permission instead. But the detach requires this fd only with BPFFALLOWMULTI. Without this flag a cgroup has only one prog per attach type. Then finddetachentry() 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 different, require CAPNETADMIN or CAPSYSADMIN in the initial user namespace. The error is -EPERM. A detach from tcx or netkit without a prog fd already requires these capabilities. With BPFFALLOWMULTI nothing changes.
Without these capabilities, a caller of bpfprogdetach() of libbpf must now use bpfprogdetach2() with the fd of the attached prog.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Operational
When detaching a cgroup BPF program without the required capabilities, use bpf_prog_detach2() with the file descriptor of the attached program.
Event History
Frequently Asked Questions
What conditions are required for an unauthorized detach to occur?
The detach must target a cgroup attachment that does not use BPF_F_ALLOW_MULTI, so that only one program exists for the attach type. The caller must invoke cgroup program detach without the attached program's file descriptor and without CAP_NET_ADMIN or CAP_SYS_ADMIN in the initial user namespace.
Are multi-program cgroup attachments affected?
No behavior changes for detach operations using BPF_F_ALLOW_MULTI. In that mode, the existing program-FD permission requirement remains in effect.
How can I identify software that may rely on the previous behavior?
Review callers of bpf_prog_detach() that detach cgroup programs without supplying the attached program FD. Callers lacking CAP_NET_ADMIN and CAP_SYS_ADMIN in the initial user namespace will need to use bpf_prog_detach2() with the attached program's FD after the fix.
What authorization does the fix enforce when the caller does not own the attached program FD?
If the caller's program differs from the attached program, detach now requires CAP_NET_ADMIN or CAP_SYS_ADMIN in the initial user namespace. Otherwise, the operation fails with -EPERM.