{"id":"CVE-2026-139700","state":"PUBLISHED","title":"bpf: Fix program BTF use-after-free in sleepable programs","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix program BTF use-after-free in sleepable programs\n\nObject kfunc calls embed metadata owned by the program BTF. A sleepable\nprogram can remain active under Tasks Trace RCU after its last reference is\ndropped, while program teardown releases the BTF through ordinary RCU. The\ninvocation can then dereference freed metadata in bpf_obj_new().\n\nMove btf_put() into __bpf_prog_put_rcu(), the callback that frees the\nprogram. When teardown is deferred, that callback runs after the program's\nown grace period (Tasks Trace RCU for sleepable programs and ordinary RCU\notherwise), so the BTF outlives every active invocation. The non-deferred\npath invokes the callback synchronously, so load-error cleanup stays direct.","publishedAt":"2026-11-30T13:37:10.112Z","updatedAt":"2026-11-30T13:37:10.112Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"958cf2e273f0929c66169e0788031310e8118722","status":"affected","lessThan":"717b6cb4a424507f62715d79ff31883a6feb56bd","versionType":"git"},{"version":"958cf2e273f0929c66169e0788031310e8118722","status":"affected","lessThan":"cf3240d37c0de66f6beb15961f25e876a20fe358","versionType":"git"},{"version":"958cf2e273f0929c66169e0788031310e8118722","status":"affected","lessThan":"29c6c52b196c496fc69f8eff0990f8ba38d2af2b","versionType":"git"},{"version":"958cf2e273f0929c66169e0788031310e8118722","status":"affected","lessThan":"d18f1ea4c71eb9a714c258249b14177be1856c35","versionType":"git"},{"version":"958cf2e273f0929c66169e0788031310e8118722","status":"affected","lessThan":"88c9c6d0a766dd146545990053e8a04422ccb367","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/syscall.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.2","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","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/syscall.c"]}],"references":["https://git.kernel.org/stable/c/717b6cb4a424507f62715d79ff31883a6feb56bd","https://git.kernel.org/stable/c/cf3240d37c0de66f6beb15961f25e876a20fe358","https://git.kernel.org/stable/c/29c6c52b196c496fc69f8eff0990f8ba38d2af2b","https://git.kernel.org/stable/c/d18f1ea4c71eb9a714c258249b14177be1856c35","https://git.kernel.org/stable/c/88c9c6d0a766dd146545990053e8a04422ccb367"],"weaknesses":[],"ingestedAt":"2026-11-30T13:54:04.526Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139700.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139700","state":"PUBLISHED","datePublished":"2026-11-30T13:37:10.112Z","dateUpdated":"2026-11-30T13:37:10.112Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.948Z"},"containers":{"cna":{"title":"bpf: Fix program BTF use-after-free in sleepable programs","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix program BTF use-after-free in sleepable programs\n\nObject kfunc calls embed metadata owned by the program BTF. A sleepable\nprogram can remain active under Tasks Trace RCU after its last reference is\ndropped, while program teardown releases the BTF through ordinary RCU. The\ninvocation can then dereference freed metadata in bpf_obj_new().\n\nMove btf_put() into __bpf_prog_put_rcu(), the callback that frees the\nprogram. When teardown is deferred, that callback runs after the program's\nown grace period (Tasks Trace RCU for sleepable programs and ordinary RCU\notherwise), so the BTF outlives every active invocation. The non-deferred\npath invokes the callback synchronously, so load-error cleanup stays direct."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"958cf2e273f0929c66169e0788031310e8118722","status":"affected","lessThan":"717b6cb4a424507f62715d79ff31883a6feb56bd","versionType":"git"},{"version":"958cf2e273f0929c66169e0788031310e8118722","status":"affected","lessThan":"cf3240d37c0de66f6beb15961f25e876a20fe358","versionType":"git"},{"version":"958cf2e273f0929c66169e0788031310e8118722","status":"affected","lessThan":"29c6c52b196c496fc69f8eff0990f8ba38d2af2b","versionType":"git"},{"version":"958cf2e273f0929c66169e0788031310e8118722","status":"affected","lessThan":"d18f1ea4c71eb9a714c258249b14177be1856c35","versionType":"git"},{"version":"958cf2e273f0929c66169e0788031310e8118722","status":"affected","lessThan":"88c9c6d0a766dd146545990053e8a04422ccb367","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/syscall.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.2","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","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/syscall.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/717b6cb4a424507f62715d79ff31883a6feb56bd"},{"url":"https://git.kernel.org/stable/c/cf3240d37c0de66f6beb15961f25e876a20fe358"},{"url":"https://git.kernel.org/stable/c/29c6c52b196c496fc69f8eff0990f8ba38d2af2b"},{"url":"https://git.kernel.org/stable/c/d18f1ea4c71eb9a714c258249b14177be1856c35"},{"url":"https://git.kernel.org/stable/c/88c9c6d0a766dd146545990053e8a04422ccb367"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:37:10.112Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.2","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.2","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.2","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.2","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.2","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}