CVE-2026-139092: netlink: check sk_rcvbuf before charging the dump skb
In the Linux kernel, the following vulnerability has been resolved:
netlink: check skrcvbuf before charging the dump skb
Since commit ae8f160e7eb2 ("netlink: Fix wraparounds of sk->skrmemalloc."), netlinkdump() charges the dump skb first and queues it only if skrmemalloc is still below skrcvbuf. Commit a215b5723922 ("netlink: make sure we allow at least one dump skb") added an exception for an empty socket.
A dump that starts while something else is still charged to a socket with a small receive buffer fails with ENOBUFS and stays running. Every recvmsg() retries it, fails again and sets skerr, so a reader that peeks before reading, as libnl does, gets ENOBUFS on the read after each peek, never consumes the message at the head of the queue and spins forever.
I hit this with "iw dev wlan0 scan" hanging at 100% CPU on an arm64 board with a 6.6 based kernel (iw 5.19 sets SORCVBUF to 8KiB). A kprobe trace showed the scan dump starting while the NEWSCANRESULTS notification iw had just read was still charged to its socket, because iw had preempted the sender before netlinkbroadcast() returned.
Check the limit before charging, as before ae8f160e7eb2, which also covers the empty socket. netlinkrecvmsg() continues a dump only at or below half of skrcvbuf, so the skb is then always queued, and a dump goes over the limit by at most one skb. Refuse a skb that would take skrmemalloc past INTMAX, so the wraparound stays fixed.
Reproduced on net in a KVM guest with a userspace reproducer and the selftest in the next patch; both pass with this fix.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.5 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.10.275 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.226 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.119 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.16 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1
Event History
Frequently Asked Questions
Which workloads are most likely to encounter this issue?
Netlink clients that use a small socket receive buffer and begin a dump while another message is still charged to the same socket are affected. Clients that peek before reading are particularly susceptible; the report identifies libnl behavior and an "iw dev wlan0 scan" hang with iw configured for an 8 KiB SO_RCVBUF.
What observable behavior indicates that a client is affected?
The dump can repeatedly fail with ENOBUFS while remaining active. A peek-before-read client can receive ENOBUFS on every read after a peek, fail to consume the queued message, and spin indefinitely; the reported iw scan case consumed 100% CPU.