{"id":"CVE-2026-143362","state":"PUBLISHED","title":"bpf: Require prog fd or capability for cgroup detach","description":"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.","publishedAt":"2026-12-03T09:22:15.598Z","updatedAt":"2026-12-03T09:22:15.598Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2c78ee898d8f10ae6fb2fa23a3fbaec96b1b7366","status":"affected","lessThan":"ee7978b00584e4479d52b640d7bc000c3aa21701","versionType":"git"},{"version":"2c78ee898d8f10ae6fb2fa23a3fbaec96b1b7366","status":"affected","lessThan":"aa92a579ea27b5ff255bc4ef96b1fc7ff1421bfb","versionType":"git"},{"version":"2c78ee898d8f10ae6fb2fa23a3fbaec96b1b7366","status":"affected","lessThan":"655b2a6215815fdbf164f4fdb09e8b7619e6c505","versionType":"git"},{"version":"2c78ee898d8f10ae6fb2fa23a3fbaec96b1b7366","status":"affected","lessThan":"2962329f7c86fc51c177d4049c0f15a95ebd270c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/cgroup.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.8","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/cgroup.c"]}],"references":["https://git.kernel.org/stable/c/ee7978b00584e4479d52b640d7bc000c3aa21701","https://git.kernel.org/stable/c/aa92a579ea27b5ff255bc4ef96b1fc7ff1421bfb","https://git.kernel.org/stable/c/655b2a6215815fdbf164f4fdb09e8b7619e6c505","https://git.kernel.org/stable/c/2962329f7c86fc51c177d4049c0f15a95ebd270c"],"weaknesses":[],"ingestedAt":"2026-12-03T09:44:04.436Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143362.json","commit":"9e309c7c0f08856e2558a1df33f75dca027fab70","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143362","state":"PUBLISHED","datePublished":"2026-12-03T09:22:15.598Z","dateUpdated":"2026-12-03T09:22:15.598Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.371Z"},"containers":{"cna":{"title":"bpf: Require prog fd or capability for cgroup detach","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2c78ee898d8f10ae6fb2fa23a3fbaec96b1b7366","status":"affected","lessThan":"ee7978b00584e4479d52b640d7bc000c3aa21701","versionType":"git"},{"version":"2c78ee898d8f10ae6fb2fa23a3fbaec96b1b7366","status":"affected","lessThan":"aa92a579ea27b5ff255bc4ef96b1fc7ff1421bfb","versionType":"git"},{"version":"2c78ee898d8f10ae6fb2fa23a3fbaec96b1b7366","status":"affected","lessThan":"655b2a6215815fdbf164f4fdb09e8b7619e6c505","versionType":"git"},{"version":"2c78ee898d8f10ae6fb2fa23a3fbaec96b1b7366","status":"affected","lessThan":"2962329f7c86fc51c177d4049c0f15a95ebd270c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/cgroup.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.8","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/cgroup.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/ee7978b00584e4479d52b640d7bc000c3aa21701"},{"url":"https://git.kernel.org/stable/c/aa92a579ea27b5ff255bc4ef96b1fc7ff1421bfb"},{"url":"https://git.kernel.org/stable/c/655b2a6215815fdbf164f4fdb09e8b7619e6c505"},{"url":"https://git.kernel.org/stable/c/2962329f7c86fc51c177d4049c0f15a95ebd270c"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:22:15.598Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.8","versionEndExcluding":"7.4-rc2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}