CVE-2026-139299: bpf: Free what map_free() unlinks for sleepable readers

Published Nov 30, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

bpf: Free what mapfree() unlinks for sleepable readers

bpflocalstoragemapfree() takes the elements of the map off the lists of their owners, which are alive, and frees them, and the storage of an owner with its last element, behind a plain RCU grace period. Nobody uses the map any more, but the other maps of these owners are in use. A sleepable program calls the get and delete helpers under rcureadlocktrace() only. While it walks the list of an owner for its own map, or is about to lock the storage, the element it stands on, or the storage, can be freed under it.

Whatever else takes an element off the list of a live owner frees it behind an RCU Tasks Trace grace period, which implies a plain one. Do so in bpflocalstoragemapfree() as well. It waits for these callbacks before it frees the map.

This does not help a sleepable program that hands an owner to the helpers which nobody holds, and which may be gone by then.

Affected Software

1 affected component
Linux Linux kernel

Event History

Nov 30, 2026
CVE Published
via MITRE·01:33 PM
Data Sourced
via MITRE·01:33 PM
Description

Frequently Asked Questions

1

What conditions are required for this issue to occur?

The issue involves sleepable BPF programs using local-storage get or delete helpers while walking an owner's storage list or preparing to lock storage. It can occur when bpf_local_storage_map_free() removes and frees elements from still-live owners while those readers are protected only by rcu_read_lock_trace().

2

Are all BPF local-storage users exposed?

The described race specifically concerns sleepable BPF programs and local-storage map teardown. The fix changes bpf_local_storage_map_free() to wait for RCU Tasks Trace callbacks before freeing the map, protecting readers of storage associated with live owners.

3

Does the fix protect a program that supplies an owner object that is no longer held?

No. The description explicitly states that this change does not protect a sleepable program that passes an owner to the helpers when nobody holds that owner and it may already have been destroyed.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203