ipv4: reject undersized MTUs in ip_do_fragment()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < d9d1a676b033acabf8e5645f730486d1f8204a3f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ipv4: reject undersized MTUs in ip_do_fragment()
ip_do_fragment() subtracts the IPv4 header length from the effective MTU and passes the resulting payload MTU to ip_frag_next().
If the effective MTU is smaller than hlen + 8, ip_frag_next() rounds the fragment payload length down to zero. The fragmentation state then never makes forward progress: state->left, state->ptr and state->offset stay unchanged while ip_do_fragment() keeps allocating and transmitting header-only fragments until the softlockup detector fires.
This is reproducible with a route installed using "mtu lock 20", but it is also reproducible without route MTU lock, for example by forwarding a packet to a device whose MTU is 20.
Fix it in ip_do_fragment() by rejecting mtu < hlen + 8 with -EMSGSIZE, matching the existing IPv6 fragmentation check.
From the CVE record · Linux
Linux kernel IPv4 fragmentation can fail to make progress when the effective MTU is smaller than the IPv4 header length plus eight bytes. It can repeatedly allocate and transmit header-only fragments until the softlockup detector fires. This is reproducible when forwarding to a device with an MTU of 20; the input does not specify attacker access or authentication requirements.
Operators of Linux kernels that may fragment IPv4 packets with undersized effective MTUs should check their systems; affected versions are not specified.