{"id":"CVE-2026-139604","state":"PUBLISHED","title":"bpf: Clear the insn array used flag with release semantics","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Clear the insn array used flag with release semantics\n\nA program that fails after the JIT ran, for example in bpf_check_tail_call(),\nhas already stored its jitted offsets and target pointers into the insn array\nmaps it uses through bpf_prog_update_insn_ptrs() when release_insn_arrays()\nhands them back by clearing the used flag with a plain atomic_set(). Nothing\norders those stores before the flag, so on a weakly ordered architecture they\ncan still be in flight when the next program takes the map: it is acquired\nwith atomic_xchg() in bpf_insn_array_init() and reset there, and the late\nstores then land on top of whatever the new owner has written since, be it\nthat reset or the pointers its own JIT stored, leaving entries that point\ninto an image which is about to be freed.\n\nClear the flag with atomic_set_release() instead, so that everything the\nreleasing program stored is visible before the map can be acquired again.\nThis pairs with the fully ordered atomic_xchg() on the acquire side.","publishedAt":"2026-11-30T13:36:17.263Z","updatedAt":"2026-11-30T13:36:17.263Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b4ce5923e780d6896d4aaf19de5a27652b8bf1ea","status":"affected","lessThan":"ee864bab6d8ae655fb016e48cf07ab4ced5dea7f","versionType":"git"},{"version":"b4ce5923e780d6896d4aaf19de5a27652b8bf1ea","status":"affected","lessThan":"a83512036e0809497ee3259ba7458de287949b94","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/bpf_insn_array.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.19","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/bpf_insn_array.c"]}],"references":["https://git.kernel.org/stable/c/ee864bab6d8ae655fb016e48cf07ab4ced5dea7f","https://git.kernel.org/stable/c/a83512036e0809497ee3259ba7458de287949b94"],"weaknesses":[],"ingestedAt":"2026-11-30T13:52:04.503Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139604.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139604","state":"PUBLISHED","datePublished":"2026-11-30T13:36:17.263Z","dateUpdated":"2026-11-30T13:36:17.263Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.943Z"},"containers":{"cna":{"title":"bpf: Clear the insn array used flag with release semantics","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Clear the insn array used flag with release semantics\n\nA program that fails after the JIT ran, for example in bpf_check_tail_call(),\nhas already stored its jitted offsets and target pointers into the insn array\nmaps it uses through bpf_prog_update_insn_ptrs() when release_insn_arrays()\nhands them back by clearing the used flag with a plain atomic_set(). Nothing\norders those stores before the flag, so on a weakly ordered architecture they\ncan still be in flight when the next program takes the map: it is acquired\nwith atomic_xchg() in bpf_insn_array_init() and reset there, and the late\nstores then land on top of whatever the new owner has written since, be it\nthat reset or the pointers its own JIT stored, leaving entries that point\ninto an image which is about to be freed.\n\nClear the flag with atomic_set_release() instead, so that everything the\nreleasing program stored is visible before the map can be acquired again.\nThis pairs with the fully ordered atomic_xchg() on the acquire side."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b4ce5923e780d6896d4aaf19de5a27652b8bf1ea","status":"affected","lessThan":"ee864bab6d8ae655fb016e48cf07ab4ced5dea7f","versionType":"git"},{"version":"b4ce5923e780d6896d4aaf19de5a27652b8bf1ea","status":"affected","lessThan":"a83512036e0809497ee3259ba7458de287949b94","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/bpf_insn_array.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.19","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/bpf_insn_array.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/ee864bab6d8ae655fb016e48cf07ab4ced5dea7f"},{"url":"https://git.kernel.org/stable/c/a83512036e0809497ee3259ba7458de287949b94"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:36:17.263Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.19","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.19","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}