{"id":"CVE-2026-139303","state":"PUBLISHED","title":"bpf: Assume no bounds for buffers behind a tail call","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Assume no bounds for buffers behind a tail call\n\nThe bpf_map_elem, bpf_sk_storage_map and sockmap iterators hand the key\nand the value of an element to the program as buffers.  The verifier notes\nhow far a program reaches into them, and the iterator compares that with\nthe map when the program is attached.  A program that does not touch the\nbuffers passes.  It can tail-call another program of the same target,\nwhich gets the same context, and whose reach nobody compares with the\nmap:\n\n  BUG: KASAN: slab-out-of-bounds in ___bpf_prog_run+0xa46a/0xae80\n\nThe program array can be filled at any time, so there is nothing to look\nat when the link is made.  For the same reason a program with a tail call\nis taken to use the whole stack and the whole packet.  Take it to reach\nas far as can be into the buffers as well, so that these iterators refuse\nit with -EACCES.","publishedAt":"2026-11-30T13:33:30.481Z","updatedAt":"2026-11-30T13:33:30.481Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d6c4503cc29638f328e1a6e6fefbdbda401c28fc","status":"affected","lessThan":"eab5fefb00bdbbcf37eb53d5483c49f7079b11cd","versionType":"git"},{"version":"d6c4503cc29638f328e1a6e6fefbdbda401c28fc","status":"affected","lessThan":"d27a5bdee454ebab3eda81ac1670d828d9bb5857","versionType":"git"},{"version":"d6c4503cc29638f328e1a6e6fefbdbda401c28fc","status":"affected","lessThan":"4a3b402d90231b4e0fe092cf7cc61268469c9357","versionType":"git"},{"version":"d6c4503cc29638f328e1a6e6fefbdbda401c28fc","status":"affected","lessThan":"7fa323d77688e8b62b2f0bf6c3208a2c96d4a5e7","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/fixups.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.9","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.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/fixups.c"]}],"references":["https://git.kernel.org/stable/c/eab5fefb00bdbbcf37eb53d5483c49f7079b11cd","https://git.kernel.org/stable/c/d27a5bdee454ebab3eda81ac1670d828d9bb5857","https://git.kernel.org/stable/c/4a3b402d90231b4e0fe092cf7cc61268469c9357","https://git.kernel.org/stable/c/7fa323d77688e8b62b2f0bf6c3208a2c96d4a5e7"],"weaknesses":[],"ingestedAt":"2026-11-30T13:46:04.484Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139303.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139303","state":"PUBLISHED","datePublished":"2026-11-30T13:33:30.481Z","dateUpdated":"2026-11-30T13:33:30.481Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.925Z"},"containers":{"cna":{"title":"bpf: Assume no bounds for buffers behind a tail call","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Assume no bounds for buffers behind a tail call\n\nThe bpf_map_elem, bpf_sk_storage_map and sockmap iterators hand the key\nand the value of an element to the program as buffers.  The verifier notes\nhow far a program reaches into them, and the iterator compares that with\nthe map when the program is attached.  A program that does not touch the\nbuffers passes.  It can tail-call another program of the same target,\nwhich gets the same context, and whose reach nobody compares with the\nmap:\n\n  BUG: KASAN: slab-out-of-bounds in ___bpf_prog_run+0xa46a/0xae80\n\nThe program array can be filled at any time, so there is nothing to look\nat when the link is made.  For the same reason a program with a tail call\nis taken to use the whole stack and the whole packet.  Take it to reach\nas far as can be into the buffers as well, so that these iterators refuse\nit with -EACCES."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d6c4503cc29638f328e1a6e6fefbdbda401c28fc","status":"affected","lessThan":"eab5fefb00bdbbcf37eb53d5483c49f7079b11cd","versionType":"git"},{"version":"d6c4503cc29638f328e1a6e6fefbdbda401c28fc","status":"affected","lessThan":"d27a5bdee454ebab3eda81ac1670d828d9bb5857","versionType":"git"},{"version":"d6c4503cc29638f328e1a6e6fefbdbda401c28fc","status":"affected","lessThan":"4a3b402d90231b4e0fe092cf7cc61268469c9357","versionType":"git"},{"version":"d6c4503cc29638f328e1a6e6fefbdbda401c28fc","status":"affected","lessThan":"7fa323d77688e8b62b2f0bf6c3208a2c96d4a5e7","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/fixups.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.9","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.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/fixups.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/eab5fefb00bdbbcf37eb53d5483c49f7079b11cd"},{"url":"https://git.kernel.org/stable/c/d27a5bdee454ebab3eda81ac1670d828d9bb5857"},{"url":"https://git.kernel.org/stable/c/4a3b402d90231b4e0fe092cf7cc61268469c9357"},{"url":"https://git.kernel.org/stable/c/7fa323d77688e8b62b2f0bf6c3208a2c96d4a5e7"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:33:30.481Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.9","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}