{"id":"CVE-2026-143362","summary":"bpf: Require prog fd or capability for cgroup detach","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Require prog fd or capability for cgroup detach\n\nSince the commit below a cgroup prog detach does not require CAP_NET_ADMIN.\nThe fd of the attached prog gives the permission instead. But the detach\nrequires this fd only with BPF_F_ALLOW_MULTI. Without this flag a cgroup\nhas only one prog per attach type. Then find_detach_entry() returns this\nprog and does not compare it with the prog of the caller. Thus the kernel\ndetaches this prog for a caller with neither the fd nor a capability.\n\nCompare the two progs. If they are different, require CAP_NET_ADMIN or\nCAP_SYS_ADMIN in the initial user namespace. The error is -EPERM. A detach\nfrom tcx or netkit without a prog fd already requires these capabilities.\nWith BPF_F_ALLOW_MULTI nothing changes.\n\nWithout these capabilities, a caller of bpf_prog_detach() of libbpf must\nnow use bpf_prog_detach2() with the fd of the attached prog.","modified":"2026-12-03T11:02:08.573958138Z","published":"2026-12-03T09:22:15.598Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143362.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/2962329f7c86fc51c177d4049c0f15a95ebd270c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/655b2a6215815fdbf164f4fdb09e8b7619e6c505"},{"type":"WEB","url":"https://git.kernel.org/stable/c/aa92a579ea27b5ff255bc4ef96b1fc7ff1421bfb"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ee7978b00584e4479d52b640d7bc000c3aa21701"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143362.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143362"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"2c78ee898d8f10ae6fb2fa23a3fbaec96b1b7366"},{"fixed":"ee7978b00584e4479d52b640d7bc000c3aa21701"},{"fixed":"aa92a579ea27b5ff255bc4ef96b1fc7ff1421bfb"},{"fixed":"655b2a6215815fdbf164f4fdb09e8b7619e6c505"},{"fixed":"2962329f7c86fc51c177d4049c0f15a95ebd270c"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143362.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.8.0"},{"fixed":"6.12.120"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.66"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143362.json"}}],"schema_version":"1.9.2"}