Skip to content

net: tcp: fix CVE-2026-29007 and CVE-2026-29008

Prasanth R u-boot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net: tcp: drop segments with an invalid data offsetnet/tcp.c+13 -10 replies
2/2net: tcp: check option lengths in tcp_parse_options()net/tcp.c+23 -190 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] net: tcp: fix CVE-2026-29007 and CVE-2026-29008

The legacy TCP stack trusts the data offset and the option lengths of received segments. A segment whose data offset points past its end makes tcp_parse_options() read beyond the packet (CVE-2026-29007) and makes payload_len negative, which reaches memcpy() as a huge size in TCP_SYN_SENT (CVE-2026-29008). Both were disclosed on this list by VulnCheck in May; as far as I can see they are not fixed yet.

Patch 1 drops segments whose data offset does not fit. Patch 2 makes tcp_parse_options() check each option against the option area, which also fixes a read past the end when the last option byte is TCP_O_END, and limits the window scale to 14.

Testing: ran tcp_parse_options() and the length handling from main and from this series under AddressSanitizer with the malformed segments. Main reads past the packet in all cases; with the series the segments are dropped or the options ignored.
Also built sandbox on current main and ran ut cmd net_test_wget: no failures.

I used an AI assistant (Claude) to help write and test these patches; I reviewed the changes and the results.

Prasanth R (2):
net: tcp: drop segments with an invalid data offset
net: tcp: check option lengths in tcp_parse_options()

 net/tcp.c | 56 +++++++++++++++++++++++++++++++++++--------------------
 1 file changed, 36 insertions(+), 20 deletions(-)
Signature · 1 line
2.43.0