CVE-2026-68386: bpf, sockmap: Reject unhashed UDP sockets on sockmap update
In the Linux kernel, the following vulnerability has been resolved:
bpf, sockmap: Reject unhashed UDP sockets on sockmap update
UDP sockets get SOCKRCUFREE set when (auto-)bound. This means skisrefcounted(unbound) = true, while skisrefcounted(bound) = false.
Because sockmap accepts unbound UDP sockets, a BPF program can increment a socket's refcount via lookup. If the socket is subsequently bound, the transition from unbound to bound causes bpfskrelease() to skip the decrement of the refcount, causing a memory leak.
unreferenced object 0xffff88810bc2eb40 (size 1984): comm "testprogs", pid 2451, jiffies 4295320596 hex dump (first 32 bytes): 7f 00 00 01 7f 00 00 01 d2 04 1b b7 04 d2 00 00 ................ 02 00 01 40 00 00 00 00 00 00 00 00 00 00 00 00 ...@............ backtrace (crc bdee079d): kmemcacheallocnoprof+0x557/0x660 skprotalloc+0x69/0x240 skalloc+0x30/0x460 inetcreate+0x2ce/0xf80 sockcreate+0x25b/0x5c0 syssocket+0x119/0x1d0 x64syssocket+0x72/0xd0 dosyscall64+0xa1/0x5f0 entrySYSCALL64afterhwframe+0x76/0x7e
Instead of special-casing for refcounted sockets, reject unhashed UDP sockets during sockmap updates, as there is no benefit to supporting those. This effectively reverts the commit under Fixes, with two exceptions:
1. sockmapskstateallowed() maintains a fall-through return true. 2. In the spirit of commit b8b8315e39ff ("bpf, sockmap: Remove unhash handler for BPF sockmap usage"), the proto::unhash BPF handler is not reintroduced.
Historical note: this issue is related to commit 67312adc96b5 ("bpf: reject unhashed sockets in bpfskassign").
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-68386?
CVE-2026-68386 has a risk score of 23, indicating a significant security vulnerability.
How do I fix CVE-2026-68386?
To fix CVE-2026-68386, ensure that your Linux kernel is updated to the latest version where this vulnerability has been resolved.
What systems are affected by CVE-2026-68386?
CVE-2026-68386 affects the Linux kernel where bpf and sockmap functionalities are implemented.
What does CVE-2026-68386 involve?
CVE-2026-68386 involves the rejection of unhashed UDP sockets on sockmap updates in the Linux kernel.
When was CVE-2026-68386 published?
CVE-2026-68386 was published on August 10, 2026.