CVE-2026-31669: mptcp: fix slab-use-after-free in __inet_lookup_established
In the Linux kernel, the following vulnerability has been resolved:
mptcp: fix slab-use-after-free in inetlookupestablished
The ehash table lookups are lockless and rely on SLABTYPESAFEBYRCU to guarantee socket memory stability during RCU read-side critical sections. Both tcpprot and tcpv6prot have their slab caches created with this flag via protoregister().
However, MPTCP's mptcpsubflowinit() copies tcpv6prot into tcpv6protoverride during inetinit() (fsinitcall, level 5), before inet6init() (moduleinit/deviceinitcall, level 6) has called protoregister(&tcpv6prot). At that point, tcpv6prot.slab is still NULL, so tcpv6protoverride.slab remains NULL permanently.
This causes MPTCP v6 subflow child sockets to be allocated via kmalloc (falling into kmalloc-4k) instead of the TCPv6 slab cache. The kmalloc-4k cache lacks SLABTYPESAFEBYRCU, so when these sockets are freed without SOCKRCUFREE (which is cleared for child sockets by design), the memory can be immediately reused. Concurrent ehash lookups under rcureadlock can then access freed memory, triggering a slab-use-after-free in inetlookupestablished.
Fix this by splitting the IPv6-specific initialization out of mptcpsubflowinit() into a new mptcpsubflowv6init(), called from mptcpprotov6init() before protocol registration. This ensures tcpv6protoverride.slab correctly inherits the SLABTYPESAFEBYRCU slab cache.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-31669?
CVE-2026-31669 is classified as a high-severity vulnerability due to the potential for remote code execution and system instability.
How do I fix CVE-2026-31669?
To mitigate CVE-2026-31669, users should upgrade to the patched version of the Linux kernel that resolves this issue.
What systems are affected by CVE-2026-31669?
CVE-2026-31669 affects the Linux kernel specifically in the MPTCP configuration.
What type of vulnerability is CVE-2026-31669?
CVE-2026-31669 is characterized as a slab-use-after-free vulnerability in the Linux kernel.
What potential impacts can CVE-2026-31669 have?
The exploitation of CVE-2026-31669 could lead to denial of service, system crashes, or unauthorized access.