CVE-2026-143362: bpf: Require prog fd or capability for cgroup detach

Published Dec 3, 2026
·
Updated

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

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Operational

    For cgroup BPF detach without BPF_F_ALLOW_MULTI, use bpf_prog_detach2() with the file descriptor of the attached program; if the caller's program differs from the attached program, require CAP_NET_ADMIN or CAP_SYS_ADMIN in the initial user namespace.

Event History

Dec 3, 2026
CVE Published
via MITRE·09:22 AM
Data Sourced
via MITRE·09:22 AM
Description
Data Sourced
via NVD·10:18 AM
Description

Frequently Asked Questions

1

Which cgroup BPF attachment scenarios are affected?

The issue applies when BPF_F_ALLOW_MULTI is not used, so the cgroup has a single program for the relevant attach type. Attachments using BPF_F_ALLOW_MULTI are unchanged.

2

What could a caller do without the required permissions?

A caller could detach the program returned by the kernel without possessing that program's file descriptor and without CAP_NET_ADMIN or CAP_SYS_ADMIN in the initial user namespace. The corrected behavior rejects a detach involving a different program with -EPERM unless one of those capabilities is present.

3

What changes are needed for libbpf callers after applying the fix?

A caller without the required capabilities must use bpf_prog_detach2() and provide the file descriptor of the attached program. Calls to bpf_prog_detach() without that descriptor can no longer detach the program in this case.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203