Skip to content

net: fix out-of-bounds write in IP fragment reassembly

Shahriyar Jalayeri u-boot 2 versions – In review

Get series with b4
b4 am [email protected] change-id 20260722-net-oob-fix-4b8fc8adeec6

Versions newest first

  1. v2 Latest2 patches 1 replyIn review
  2. v12 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Use my real name in the From and Signed-off-by (Jerome Forissier)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net: fix out-of-bounds write in IP fragment reassemblynet/net.c+4 -01 reply
2/2test: net: add regression test for IP reassembly overflowtest/dm/net_defrag.c+36 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJerome Forissier
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] net: fix out-of-bounds write in IP fragment reassembly

This fixes an out-of-bounds write in IP fragment reassembly and adds a regression test.

__net_defragment() writes an 8-byte hole descriptor that can land past the end of the static reassembly buffer when a fragment with a non-zero offset and the More-Fragments flag set is received during netboot. It is reachable on the local network segment while the device is in a receive loop (dhcp/tftp/nfs/ping). Patch 1 adds the bounds check; patch 2 adds a DM test that reproduces the overflow.

Based on v2026.07 (fdfe2ec48d5c).

---
Changes in v2:
- Use my real name in the From and Signed-off-by (Jerome Forissier)

---
Shahriyar Jalayeri (2):
net: fix out-of-bounds write in IP fragment reassembly
test: net: add regression test for IP reassembly overflow

 net/net.c            |  4 ++++
 test/dm/net_defrag.c | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)

---
base-commit: fdfe2ec48d5c1c2ed03073d73edd3fdd3fe1ffa1
change-id: 20260722-net-oob-fix-4b8fc8adeec6

Best regards,

Signature · 1 line
Shahriyar Jalayeri <[email protected]>