CVE-2026-53366: ipv4: account for fraggap on the paged allocation path
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ipv4: account for fraggap on the paged allocation path
In __ip_append_data(), when the paged-allocation branch is taken, alloclen and pagedlen are computed as
alloclen = fragheaderlen + transhdrlen; pagedlen = datalen - transhdrlen;
datalen already includes fraggap, but the fraggap bytes carried over from the previous skb are copied into the new skb's linear area at offset transhdrlen by the subsequent skb_copy_and_csum_bits(). The linear area is therefore undersized by fraggap bytes while pagedlen is overstated by the same amount.
The non-paged branch sets alloclen to fraglen, which already accounts for fraggap because datalen does. Bring the paged branch in line by adding fraggap to alloclen and subtracting it from pagedlen.
After this adjustment, copy no longer collapses to -fraggap on the paged path, so remove the stale comment describing that old arithmetic.
The Linux kernel CVE team has assigned CVE-2026-53366 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.0 with commit 8eb77cc73977d88787b37c92831b1c242e035396 and fixed in 6.6.144 with commit ce494707a9c07f27c219ca67f3e138061f53d9b3 Issue introduced in 6.0 with commit 8eb77cc73977d88787b37c92831b1c242e035396 and fixed in 6.12.95 with commit a9c24eda24bd15f432e37824e6fc440977cb241c Issue introduced in 6.0 with commit 8eb77cc73977d88787b37c92831b1c242e035396 and fixed in 6.18.38 with commit 77798d7be6ef71e72fb6fc8a2901bf74ebc9706f Issue introduced in 6.0 with commit 8eb77cc73977d88787b37c92831b1c242e035396 and fixed in 7.1.3 with commit c04d9ece23deb9e26c19f9ca215e98b3295aa1bb Issue introduced in 6.0 with commit 8eb77cc73977d88787b37c92831b1c242e035396 and fixed in 7.2-rc1 with commit eca856950f7cb1a221e02b99d758409f2c5cec42
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-53366
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
net/ipv4/ip_output.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/ce494707a9c07f27c219ca67f3e138061f53d9b3 https://git.kernel.org/stable/c/a9c24eda24bd15f432e37824e6fc440977cb241c https://git.kernel.org/stable/c/77798d7be6ef71e72fb6fc8a2901bf74ebc9706f https://git.kernel.org/stable/c/c04d9ece23deb9e26c19f9ca215e98b3295aa1bb https://git.kernel.org/stable/c/eca856950f7cb1a221e02b99d758409f2c5cec42