AZL-117046: CVE-2026-139310 affecting package kernel 6.6.161.1-1

Published Nov 30, 2026
·
Updated

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

bpf: Hold the socket in the skstorage map iterator

The iterator over a skstorage map passes the owner of an element to its program as ctx->sk, without a reference. All that it holds is the RCU read lock, which keeps the element and the storage, not the socket.

An element is unlinked by bpfskstoragefree(), which skdestruct() calls right before it frees the socket. That is no better for a socket with SOCKRCUFREE: the grace period comes in front of skdestruct(), so a reader which starts behind callrcu() still finds the element. The program and the helpers it hands ctx->sk to, such as bpfskstorageget() or bpfskstoragedelete(), use a socket which is being freed on another CPU. It takes nothing but reading the iterator while sockets with an element in the map are closed, by whomever.

Take a reference for the time of the program, and skip the element if there is none to be had. To look at the owner at all, do what bpfselemunlinknofail() does for bpflocalstoragemapfree(): as long as the element is linked under the lock of the storage, bpflocalstoragedestroy() has not got past it, unless it has given up on the lock, and then it waits for ownerrefcnt.

The last reference may now be dropped by the iterator. The end of a socket may want process context: rfcommsockdestruct() takes a mutex. So only drop the reference under RCU, and free a socket whose last one it was when the RCU read lock has been released, which is at the end of a bucket and of every read() at the latest.

Affected Software

1 affected component
azure-linux/kernel<=6.6.161.1-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In the sk_storage map iterator, hold a reference to the socket for the duration of the program.

Event History

Nov 30, 2026
Advisory Published
via OSV·02:18 PM
Data Sourced
via OSV·02:18 PM
DescriptionAffected Software

Child vulnerabilities

Contains the following vulnerabilities.

Frequently Asked Questions

1

What conditions are required to trigger this issue?

A BPF sk_storage map iterator must run while sockets that have elements in that map are being closed. The description states that this can occur merely by reading the iterator during socket closure, regardless of who closes the sockets.

2

What is the impact during the race?

The iterator can pass a socket to its BPF program without holding a reference to that socket. The program or helpers such as bpf_sk_storage_get() and bpf_sk_storage_delete() may then use a socket that is being freed on another CPU.

3

How does the resolved implementation mitigate the problem?

The fix takes a socket reference for the duration of the BPF program's execution and skips an element when a reference cannot be obtained. This prevents the program from operating on a socket being 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