net: ipv4: bound TCP reordering sysctl writes and MTU probe sizes
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 91cc17c0e5e5ada156a8d5787a2509d263ea6bbf · < bbae351c0f32f7c200249e4aa6561b2b419dcf69| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: ipv4: bound TCP reordering sysctl writes and MTU probe sizes
Reject invalid `net.ipv4.tcp_reordering` values before they reach TCP socket state. The sysctl is stored as an `int` but copied into the `u32` `tp->reordering` field for new sockets, so negative writes wrap to large values.
With `tcp_mtu_probing=2`, the wrapped value can overflow the `tcp_mtu_probe()` size calculation and drive the MTU probing path into an out-of-bounds read. Route `tcp_reordering` writes through `proc_dointvec_minmax()` and require it to be at least 1. Also require `tcp_max_reordering` to be at least 1 so the configured maximum cannot become negative either.
When registering the table for a non-init network namespace, relocate `extra2` pointers that refer into `init_net.ipv4` so the `tcp_reordering` upper bound follows that namespace's `tcp_max_reordering`.
Harden `tcp_mtu_probe()` itself by computing `size_needed` as `u64`. This keeps the send queue and window checks from being bypassed through signed integer overflow.
From the CVE record · Linux
The Linux kernel accepts negative `net.ipv4.tcp_reordering` values that can wrap when copied into new TCP sockets. If `tcp_mtu_probing=2`, a negative value can overflow an MTU probe size calculation and cause an out-of-bounds read. Exploitation requires the ability to write the sysctl; the input does not specify whether user interaction is needed.
Engineers running the Linux kernel should check affected versions with their vendor; no version range is provided.