tcp: ipv6: clamp default adverting MSS to avoid GSO_BY_FRAGS (0xFFFF)
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3953c46c3ac7eef31a9935427371c6f54a22f1ba · < d774cdbda6634a78d0f2baf201ee5a8c57f3bc0e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
tcp: ipv6: clamp default adverting MSS to avoid GSO_BY_FRAGS (0xFFFF)
When MTU is large, ip6_default_advmss() can return IPV6_MAXPLEN (65535). This is interpreted by TCP as mss_clamp, allowing the MSS to reach 65535.
However, 0xFFFF is also used as a magic value GSO_BY_FRAGS in the kernel. If a TCP packet with gso_size=0xFFFF is passed to skb_segment(), it will be mistakenly treated as GSO_BY_FRAGS, leading to a NULL pointer dereference because local TCP packets do not use frag_list.
Fix this by returning min(IPV6_MAXPLEN, GSO_BY_FRAGS - 1) (65534) from ip6_default_advmss() when MTU is large.
Also update the stale comment in ip6_default_advmss() which suggested that IPV6_MAXPLEN is returned to mean "any MSS".
From the CVE record · Linux
With a large MTU, the Linux kernel can set the default IPv6 TCP MSS to 65535, a value also used as a special marker during packet segmentation. If a local TCP packet with that GSO size reaches skb_segment(), the mix-up can cause a NULL pointer dereference. The input does not establish whether an attacker can trigger this remotely or whether authentication or user interaction is required.
Engineers running Linux kernels should check whether their versions include the IPv6 TCP fix; affected versions were not provided.