CVE-2026-143218: net: require a full socket in sock_confirm_neigh()
In the Linux kernel, the following vulnerability has been resolved:
net: require a full socket in sockconfirmneigh()
An skb can retain dstpendingconfirm after its original output and socket owner have changed. For example, a raw MSGCONFIRM packet can cross veth, have a TCP request socket assigned by TPROXY, and be bridged into gretap. Neighbor output for the outer packet then calls sockconfirmneigh() with the request socket in skb->sk.
The helper unconditionally treats a non-NULL skb->sk as a full socket when accessing skdstpendingconfirm. TCP request and TIMEWAIT sockets do not contain that field. This produces an out-of-bounds four-byte read and, if the word is nonzero, an out-of-bounds four-byte zero write. A KASAN-enabled kernel reports:
BUG: KASAN: slab-out-of-bounds in ipfinishoutput2+0xc9f/0xd60 Read of size 4 at addr ffff8880bdc3d880 by task tproxydstconf/1771
Require skfullsock() before accessing the socket field, moving the existing helper earlier in the header to make it available here. Keep neighconfirm() independent of the socket type so the skb's neighbor confirmation still works, including for socketless packets. This also covers the IPv6, VRF, and BPF neighbor-output callers.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the Linux kernel, update sock_confirm_neigh() to require sk_fullsock() before accessing sk_dst_pending_confirm; keep neighbor confirmation independent of socket type so it also works for socketless packets.
Event History
Frequently Asked Questions
What network configuration and traffic path can trigger this issue?
The described trigger involves a raw MSG_CONFIRM packet crossing a veth interface, receiving a TCP request socket through TPROXY, and then being bridged into gretap. The resulting outer-packet neighbor output can invoke the affected code with a TCP request socket attached to the skb.
How can I tell whether the issue has occurred?
On a KASAN-enabled kernel, the condition can be reported as a slab-out-of-bounds read in ip_finish_output2. The report describes a four-byte out-of-bounds read and, when the accessed word is nonzero, a four-byte out-of-bounds zero write.