CVE-2026-139206: net/sched: etf: initialise the sock_exterr_skb before filling it
In the Linux kernel, the following vulnerability has been resolved:
net/sched: etf: initialise the sockexterrskb before filling it
reportsockerror() clones the transmitted skb, overlays a struct sockexterrskb on its control block and fills in the seven struct sockextendederr fields, but never clears addroffset and port. skbclone() copies cb[] verbatim, so the errqueue entry carries the TX skb's stale control block to the receive side, and the ipv4 error-queue reader trusts those bytes:
net/ipv4/ipsockglue.c:556 sin->sinaddr.saddr = (be32 )(skbnetworkheader(skb) + serr->addroffset); sin->sinport = serr->port;
The gate that is supposed to guard that read only asks whether an address was requested at all:
net/ipv4/ipsockglue.c:484 return serr->ee.eeorigin == SOEEORIGINICMP || serr->ee.eeorigin == SOEEORIGINLOCAL || serr->port;
SOEEORIGINTXTIME is neither ICMP nor LOCAL, so for schetf the gate is decided by serr->port alone -- by the stale byte pair. When it is non-zero the reader dereferences skbnetworkheader() + addroffset with an arbitrary offset. On the TCP path cb[40..44) is not zero: the transmit path stored deliveredmstamp there (tcprateskbsent()), which is exactly where addroffset/port sit in the arm64 struct layout.
Reached with an unmodified 7.3-rc4 (arm64, KASAN, in-tree modules): a TCP socket enables TX-timestamp error reporting (SOTXTIME with SOFTXTIMEREPORTERRORS), a schetf qdisc drops the packet, and a recvmsg() reaches iprecverror():
BUG: KASAN: slab-out-of-bounds in iprecverror+0x970/0xa0c Read of size 4 at addr ffff0000158ffdd5 by task A-227-A227-1S2/113 iprecverror+0x970/0xa0c inetrecverror+0x94/0xdc tcprecvmsg+0x378/0x408 ... The buggy address is located 149 bytes to the right of allocated 704-byte region
Zero the whole overlay rather than the two fields individually: the errqueue entry is handed to the receive side as a self-contained record, which is what every other producer in the tree already does (schetf was the only error-queue producer that cleared neither field). This does not change what the in-tree selftest observes -- sotxtime.c reads only eeorigin/eeerrno/eecode/eedata/eeinfo, never msgname or sinport.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In Linux net/sched ETF, zero the entire sock_exterr_skb control-block overlay before filling it.