{"id":"CVE-2026-139305","state":"PUBLISHED","title":"bpf: Count sleepable callbacks as sleepable map users","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Count sleepable callbacks as sleepable map users\n\nmap->sleepable_refcnt tells bpf_map_fd_put_ptr() whether an inner map that\nis taken out of its outer map has to wait for an RCU Tasks Trace grace\nperiod as well.  It counts the sleepable programs that use the outer map.\nThe bpf_wq or bpf_task_work callback of a program that is not sleepable\nruns under rcu_read_lock_trace() only, and is not counted.\n\nSuch a callback can look an inner map up and keep it while user space\ndeletes it from the outer map.  The inner map is freed behind a plain RCU\ngrace period, under the callback:\n\n  BUG: KASAN: slab-use-after-free in array_map_update_elem+0x6bc/0x7d0\n\nCount a program with such a callback.  The maps are bound before the\nverifier meets the callback, so raise the count of those that are bound\nwhen it does.","publishedAt":"2026-11-30T13:33:31.601Z","updatedAt":"2026-11-30T13:33:31.601Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"8e83da9732d91c60fdc651b2486c8e5935eb0ca2","status":"affected","lessThan":"dcbbe0e979d766ed4eddf25308eb54cd13c10b62","versionType":"git"},{"version":"8e83da9732d91c60fdc651b2486c8e5935eb0ca2","status":"affected","lessThan":"29c908a15d033256d9434cce335db4f8f6719d7f","versionType":"git"},{"version":"8e83da9732d91c60fdc651b2486c8e5935eb0ca2","status":"affected","lessThan":"dfe90eecac8eb29071dc66418f15f550d6ddff0e","versionType":"git"},{"version":"8e83da9732d91c60fdc651b2486c8e5935eb0ca2","status":"affected","lessThan":"927c9c985f3ef4d30c086884b7e0ecb933f742ef","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/core.c","kernel/bpf/syscall.c","kernel/bpf/verifier.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.10","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/core.c","kernel/bpf/syscall.c","kernel/bpf/verifier.c"]}],"references":["https://git.kernel.org/stable/c/dcbbe0e979d766ed4eddf25308eb54cd13c10b62","https://git.kernel.org/stable/c/29c908a15d033256d9434cce335db4f8f6719d7f","https://git.kernel.org/stable/c/dfe90eecac8eb29071dc66418f15f550d6ddff0e","https://git.kernel.org/stable/c/927c9c985f3ef4d30c086884b7e0ecb933f742ef"],"weaknesses":[],"ingestedAt":"2026-11-30T13:46:04.484Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139305.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139305","state":"PUBLISHED","datePublished":"2026-11-30T13:33:31.601Z","dateUpdated":"2026-11-30T13:33:31.601Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.926Z"},"containers":{"cna":{"title":"bpf: Count sleepable callbacks as sleepable map users","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Count sleepable callbacks as sleepable map users\n\nmap->sleepable_refcnt tells bpf_map_fd_put_ptr() whether an inner map that\nis taken out of its outer map has to wait for an RCU Tasks Trace grace\nperiod as well.  It counts the sleepable programs that use the outer map.\nThe bpf_wq or bpf_task_work callback of a program that is not sleepable\nruns under rcu_read_lock_trace() only, and is not counted.\n\nSuch a callback can look an inner map up and keep it while user space\ndeletes it from the outer map.  The inner map is freed behind a plain RCU\ngrace period, under the callback:\n\n  BUG: KASAN: slab-use-after-free in array_map_update_elem+0x6bc/0x7d0\n\nCount a program with such a callback.  The maps are bound before the\nverifier meets the callback, so raise the count of those that are bound\nwhen it does."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"8e83da9732d91c60fdc651b2486c8e5935eb0ca2","status":"affected","lessThan":"dcbbe0e979d766ed4eddf25308eb54cd13c10b62","versionType":"git"},{"version":"8e83da9732d91c60fdc651b2486c8e5935eb0ca2","status":"affected","lessThan":"29c908a15d033256d9434cce335db4f8f6719d7f","versionType":"git"},{"version":"8e83da9732d91c60fdc651b2486c8e5935eb0ca2","status":"affected","lessThan":"dfe90eecac8eb29071dc66418f15f550d6ddff0e","versionType":"git"},{"version":"8e83da9732d91c60fdc651b2486c8e5935eb0ca2","status":"affected","lessThan":"927c9c985f3ef4d30c086884b7e0ecb933f742ef","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/core.c","kernel/bpf/syscall.c","kernel/bpf/verifier.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.10","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.10","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/core.c","kernel/bpf/syscall.c","kernel/bpf/verifier.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/dcbbe0e979d766ed4eddf25308eb54cd13c10b62"},{"url":"https://git.kernel.org/stable/c/29c908a15d033256d9434cce335db4f8f6719d7f"},{"url":"https://git.kernel.org/stable/c/dfe90eecac8eb29071dc66418f15f550d6ddff0e"},{"url":"https://git.kernel.org/stable/c/927c9c985f3ef4d30c086884b7e0ecb933f742ef"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:33:31.601Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.10","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.10","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.10","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.10","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}