Files
u-boot-krane/net
Shahriyar JalayeriandJerome Forissier 04ca915d5b net: fix out-of-bounds write in IP fragment reassembly
__net_defragment() reassembles IP fragments into the static buffer
pkt_buff[CONFIG_NET_MAXDEFRAG].  The bounds check

	if (start + len > IP_MAXUDP)
		return NULL;

only covers the fragment data copy.  The split-hole and move-hole
branches additionally write an 8-byte struct hole via "*newh = *h" at
newh = thisfrag + len / 8, which can land up to sizeof(struct hole)
bytes past the end of pkt_buff.  A single fragment with a non-zero
fragment offset and the More-Fragments flag set reaches this path, so
a crafted fragment received during netboot overflows the buffer.

Reject any fragment whose trailing hole descriptor would fall outside
pkt_buff.

Signed-off-by: Shahriyar Jalayeri <shahriyar@byteray.co.uk>
Acked-by: Jerome Forissier <jerome.forissier@arm.com>
2026-07-30 13:56:26 +02:00
..
2025-10-22 11:16:09 +02:00
2024-07-15 12:12:18 -06:00
2026-06-25 14:15:33 -06:00
2023-12-21 08:54:37 -05:00
2025-05-29 08:30:25 -06:00
2024-07-15 12:12:18 -06:00
2025-08-01 09:30:47 +02:00