{"id":"CVE-2026-139299","state":"PUBLISHED","title":"bpf: Free what map_free() unlinks for sleepable readers","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Free what map_free() unlinks for sleepable readers\n\nbpf_local_storage_map_free() takes the elements of the map off the lists\nof their owners, which are alive, and frees them, and the storage of an\nowner with its last element, behind a plain RCU grace period.  Nobody uses\nthe map any more, but the other maps of these owners are in use.  A\nsleepable program calls the get and delete helpers under\nrcu_read_lock_trace() only.  While it walks the list of an owner for its\nown map, or is about to lock the storage, the element it stands on, or the\nstorage, can be freed under it.\n\nWhatever else takes an element off the list of a live owner frees it\nbehind an RCU Tasks Trace grace period, which implies a plain one.  Do so\nin bpf_local_storage_map_free() as well.  It waits for these callbacks\nbefore it frees the map.\n\nThis does not help a sleepable program that hands an owner to the helpers\nwhich nobody holds, and which may be gone by then.","publishedAt":"2026-11-30T13:33:28.261Z","updatedAt":"2026-11-30T13:33:28.261Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"dcf456c9a095a6e71f53d6f6f004133ee851ee70","status":"affected","lessThan":"e4bee26f640d6d150f2f9dc2da6f952b897e57de","versionType":"git"},{"version":"dcf456c9a095a6e71f53d6f6f004133ee851ee70","status":"affected","lessThan":"9cf351ee561e63f1e5181a724dfd696c522d900e","versionType":"git"},{"version":"dcf456c9a095a6e71f53d6f6f004133ee851ee70","status":"affected","lessThan":"5bdd61e98da5468140aff5b5abc0e8544deaf2ee","versionType":"git"},{"version":"cf4b46ea392d75cc06800be7397d58d54453c6f3","status":"affected","versionType":"git"},{"version":"d2d2a1b6670bfac94a8b6a1fa9ce8b786cbe972e","status":"affected","versionType":"git"},{"version":"5.17.13","status":"affected","lessThan":"5.18","versionType":"semver"},{"version":"5.18.2","status":"affected","lessThan":"5.19","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/bpf_local_storage.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.19","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/bpf_local_storage.c"]}],"references":["https://git.kernel.org/stable/c/e4bee26f640d6d150f2f9dc2da6f952b897e57de","https://git.kernel.org/stable/c/9cf351ee561e63f1e5181a724dfd696c522d900e","https://git.kernel.org/stable/c/5bdd61e98da5468140aff5b5abc0e8544deaf2ee"],"weaknesses":[],"ingestedAt":"2026-11-30T13:46:04.484Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139299.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139299","state":"PUBLISHED","datePublished":"2026-11-30T13:33:28.261Z","dateUpdated":"2026-11-30T13:33:28.261Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.925Z"},"containers":{"cna":{"title":"bpf: Free what map_free() unlinks for sleepable readers","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Free what map_free() unlinks for sleepable readers\n\nbpf_local_storage_map_free() takes the elements of the map off the lists\nof their owners, which are alive, and frees them, and the storage of an\nowner with its last element, behind a plain RCU grace period.  Nobody uses\nthe map any more, but the other maps of these owners are in use.  A\nsleepable program calls the get and delete helpers under\nrcu_read_lock_trace() only.  While it walks the list of an owner for its\nown map, or is about to lock the storage, the element it stands on, or the\nstorage, can be freed under it.\n\nWhatever else takes an element off the list of a live owner frees it\nbehind an RCU Tasks Trace grace period, which implies a plain one.  Do so\nin bpf_local_storage_map_free() as well.  It waits for these callbacks\nbefore it frees the map.\n\nThis does not help a sleepable program that hands an owner to the helpers\nwhich nobody holds, and which may be gone by then."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"dcf456c9a095a6e71f53d6f6f004133ee851ee70","status":"affected","lessThan":"e4bee26f640d6d150f2f9dc2da6f952b897e57de","versionType":"git"},{"version":"dcf456c9a095a6e71f53d6f6f004133ee851ee70","status":"affected","lessThan":"9cf351ee561e63f1e5181a724dfd696c522d900e","versionType":"git"},{"version":"dcf456c9a095a6e71f53d6f6f004133ee851ee70","status":"affected","lessThan":"5bdd61e98da5468140aff5b5abc0e8544deaf2ee","versionType":"git"},{"version":"cf4b46ea392d75cc06800be7397d58d54453c6f3","status":"affected","versionType":"git"},{"version":"d2d2a1b6670bfac94a8b6a1fa9ce8b786cbe972e","status":"affected","versionType":"git"},{"version":"5.17.13","status":"affected","lessThan":"5.18","versionType":"semver"},{"version":"5.18.2","status":"affected","lessThan":"5.19","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["kernel/bpf/bpf_local_storage.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.19","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/bpf_local_storage.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/e4bee26f640d6d150f2f9dc2da6f952b897e57de"},{"url":"https://git.kernel.org/stable/c/9cf351ee561e63f1e5181a724dfd696c522d900e"},{"url":"https://git.kernel.org/stable/c/5bdd61e98da5468140aff5b5abc0e8544deaf2ee"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:33:28.261Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.19","versionEndExcluding":"7.4-rc1"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.17.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}