CVE-2026-139312: bpf: Fix NULL deref in the sk_storage map iterator

Published Nov 30, 2026
·
Updated

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

bpf: Fix NULL deref in the skstorage map iterator

bpfskstoragemapseqfindnext() hands out an element only if its localstorage pointer is set. bpfskstoragemapseqshow() then reads the pointer a second time and dereferences it without a test.

Since bpflocalstoragedestroy() unlinks the elements with bpfselemunlinknofail(), the pointer is reset to NULL when the socket which owns the element is destroyed, so it can change between the two reads. Reading the iterator while sockets with an element in the map are closed ends in a NULL pointer dereference. The sockets need not belong to the reader: where a program gives every new socket an element, an unprivileged user who opens and closes sockets is enough.

Skip such an element, as the TCP and UDP iterators skip a socket which has been unhashed.

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
Data Sourced
via NVD·02:18 PM
Description

Frequently Asked Questions

1

Who can trigger this issue in practice?

An unprivileged user can trigger the race by opening and closing sockets, but only where a BPF program assigns a storage-map element to every new socket. The sockets being closed do not need to belong to the process reading the iterator.

2

What activity is required for exploitation?

The sk_storage map iterator must be read while sockets that have elements in the map are being closed. Socket destruction can clear an element's local_storage pointer between the iterator's initial check and its later dereference, causing a NULL pointer dereference.

3

Are systems affected by default?

The described trigger depends on a BPF program using socket storage and attaching an element to new sockets. The provided information does not indicate that this configuration is present by default.

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