All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerome Forissier <jerome.forissier@arm.com>
To: u-boot@lists.denx.de, Shahriyar Jalayeri <shahriyar@byteray.co.uk>
Cc: Tom Rini <trini@konsulko.com>, Wayen Yan <win847@gmail.com>,
	Simon Glass <sjg@chromium.org>, Argus <argus@byteray.co.uk>,
	nd <nd@arm.com>
Subject: Re: [PATCH v2 1/2] net: fix out-of-bounds write in IP fragment reassembly
Date: Thu, 30 Jul 2026 15:28:43 +0200	[thread overview]
Message-ID: <2a00406f-0685-43f4-aed6-e94611e2d583@arm.com> (raw)
In-Reply-To: <20260728-net-oob-fix-v2-1-eae61b883ed8@byteray.co.uk>


On Tue, 28 Jul 2026 08:50:07 +0200, Shahriyar Jalayeri wrote:
> __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.
> 
> [...]

Applied to u-boot-net branch for-main, thanks!

[1/2] net: fix out-of-bounds write in IP fragment reassembly
      commit: 04ca915d5bf39dda5d1bce62d04d2b59d293c5b9
[2/2] test: net: add regression test for IP reassembly overflow
      commit: 7946774a0feb40a4abc71e749e61071ffce56979

Best regards,
-- 
Jerome Forissier <jerome.forissier@arm.com>


  reply	other threads:[~2026-07-30 13:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  6:50 [PATCH v2 0/2] net: fix out-of-bounds write in IP fragment reassembly Shahriyar Jalayeri
2026-07-28  6:50 ` [PATCH v2 1/2] " Shahriyar Jalayeri
2026-07-30 13:28   ` Jerome Forissier [this message]
2026-07-28  6:50 ` [PATCH v2 2/2] test: net: add regression test for IP reassembly overflow Shahriyar Jalayeri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a00406f-0685-43f4-aed6-e94611e2d583@arm.com \
    --to=jerome.forissier@arm.com \
    --cc=argus@byteray.co.uk \
    --cc=nd@arm.com \
    --cc=shahriyar@byteray.co.uk \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=win847@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.