CVE-2026-143262: tcp: ipv6: free ireq->ipv6_opt after an RCU grace period
In the Linux kernel, the following vulnerability has been resolved:
tcp: ipv6: free ireq->ipv6opt after an RCU grace period
ireq->ipv6opt is only set by calipsoreqsetattr(), when a CALIPSO NetLabel mapping is configured.
Request socket migration (net.ipv4.tcpmigratereq=1, or a BPFSKREUSEPORTSELECTORMIGRATE program) clones the request socket with inetreqskclone(), so that the old request socket and its clone share the same ipv6opt, then reqskmigratereset() clears the pointer in the old one.
Another cpu holding a reference on the old request socket can still be using these options, sending a SYNACK from tcpv6sendsynack() or creating a child in tcpv6synrecvsock(), when the clone is freed. tcpv6reqskdestructor() frees ipv6opt with a plain kfree(), leading to a use-after-free.
Both readers already run under RCU, like their IPv4 counterparts. Use kfreercu() in tcpv6reqskdestructor(), as commit e3f33b0a1d89 ("ipv4: free inetopt and ireqopt after an RCU grace period") did for ireqopt.
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.15.227 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.120 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.66 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7 - Compensating control
In tcp_v6_reqsk_destructor(), free ireq->ipv6_opt with kfree_rcu() so it remains valid until an RCU grace period has elapsed.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Exposure requires IPv6 TCP request sockets with a CALIPSO NetLabel mapping configured, because that is what sets ireq->ipv6_opt. The race also requires request socket migration, enabled through net.ipv4.tcp_migrate_req=1 or a BPF_SK_REUSEPORT_SELECT_OR_MIGRATE program.
What concurrent activity triggers the use-after-free?
A migrated request socket and its clone can share the same IPv6 options. If the clone is freed while another CPU still holds the old request socket and is sending a SYNACK or creating a child socket, that CPU can access options that were freed.
Is a standard configuration affected?
The described path is not reached unless a CALIPSO NetLabel mapping is configured and request socket migration is in use. The data does not indicate that either condition is enabled by default.
What mitigation is available before applying the fix?
Avoid or disable request socket migration where feasible, including net.ipv4.tcp_migrate_req=1 and BPF_SK_REUSEPORT_SELECT_OR_MIGRATE use. Removing the CALIPSO NetLabel mapping also prevents ireq->ipv6_opt from being set.