tcp: clamp route advmss to TCP_MIN_MSS
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 31cf2349361902769dc323e4dbf4b449795ec288| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
tcp: clamp route advmss to TCP_MIN_MSS
tcp_select_initial_window() assumes that callers never pass an MSS smaller than 1, but route-derived advmss values can violate that assumption.
A too-small explicit RTAX_ADVMSS is one way to get there, but it is not the only one. The same divide-by-zero can also be reached through the "default advmss" path when RTAX_ADVMSS is left at 0 and the effective advmss is later driven down by route MTU and min_adv_mss.
Introduce a tcp_dst_advmss() helper that clamps route advmss to TCP_MIN_MSS before TCP consumes it, and use it in the TCP paths that derive advmss from dst metrics. This keeps the effective MSS from dropping to zero before tcp_select_initial_window() rounds the receive window.
From the CVE record · Linux
The Linux kernel can pass a route-derived MSS of zero to tcp_select_initial_window(), causing a divide-by-zero. This can happen with an explicitly small RTAX_ADVMSS or through the default advmss path when route MTU and min_adv_mss drive the effective value down. The input does not specify whether an attacker needs local access, authentication, or user interaction.
Engineers running the Linux kernel should check their installations; affected versions are not specified.