net: stmmac: fix TSO header length truncation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: stmmac: fix TSO header length truncation
stmmac_tso_xmit() stores the protocol header length returned by stmmac_tso_header_size() in a u8. stmmac_tso_valid_packet() admits headers up to 1023 bytes, so a header longer than 255 bytes wraps modulo 256 (486 becomes 230, 256 becomes 0).
A TCP over IPv6 socket carrying a few hundred bytes of sticky destination/hop-by-hop options makes skb_tcp_all_headers() exceed 255 while staying below the 1023-byte limit, so such an skb reaches stmmac_tso_xmit().
Widen proto_hdr_len to unsigned int, which is sufficient since the value is bounded by the hardware limit, and adjust the debug print specifier accordingly.
From the CVE record · Linux
The Linux kernel’s stmmac TSO transmit path stores a protocol header length in an 8-bit value, causing lengths above 255 bytes to wrap. A TCP-over-IPv6 socket with sufficiently large sticky destination or hop-by-hop options can trigger this when the header remains within the accepted 1023-byte limit. The input does not specify authentication requirements, user interaction, or a resulting impact beyond the truncated length.
Engineers running Linux kernels with the stmmac driver should check their versions against the vendor advisory; affected versions were not provided.