public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Cc: u-boot@lists.denx.de, Fabio Estevam <festevam@denx.de>,
	Nicolas Bidron <nicolas.bidron@nccgroup.com>,
	Joe Hershberger <joe.hershberger@ni.com>,
	Ramon Fried <rfried.dev@gmail.com>
Subject: Re: [PATCH 7/6] net: deal with fragment-overlapping-two-holes case
Date: Mon, 28 Nov 2022 14:52:03 -0500	[thread overview]
Message-ID: <20221128195203.GI3787616@bill-the-cat> (raw)
In-Reply-To: <20221017075251.3359940-1-rasmus.villemoes@prevas.dk>

[-- Attachment #1: Type: text/plain, Size: 971 bytes --]

On Mon, Oct 17, 2022 at 09:52:51AM +0200, Rasmus Villemoes wrote:

> With a suitable sequence of malicious packets, it's currently possible
> to get a hole descriptor to contain arbitrary attacker-controlled
> contents, and then with one more packet to use that as an arbitrary
> write vector.
> 
> While one could possibly change the algorithm so we instead loop over
> all holes, and in each hole puts as much of the current fragment as
> belongs there (taking care to carefully update the hole list as
> appropriate), it's not worth the complexity: In real, non-malicious
> scenarios, one never gets overlapping fragments, and certainly not
> fragments that would be supersets of one another.
> 
> So instead opt for this simple protection: Simply don't allow the
> eventual memcpy() to write beyond the last_byte of the current hole.
> 
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2022-11-28 19:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-14 17:43 [PATCH 0/6] broken CVE fix (b85d130ea0ca) Rasmus Villemoes
2022-10-14 17:43 ` [PATCH 1/6] net: improve check for no IP options Rasmus Villemoes
2022-10-16 18:23   ` Ramon Fried
2022-11-28 19:51   ` Tom Rini
2022-10-14 17:43 ` [PATCH 2/6] net: compare received length to sizeof(ip_hdr), not sizeof(ip_udp_hdr) Rasmus Villemoes
2022-11-28 19:51   ` Tom Rini
2022-10-14 17:43 ` [PATCH 3/6] net: (actually/better) deal with CVE-2022-{30790,30552} Rasmus Villemoes
2022-11-28 19:51   ` Tom Rini
2022-10-14 17:43 ` [PATCH 4/6] net: fix ip_len in reassembled IP datagram Rasmus Villemoes
2022-11-28 19:51   ` Tom Rini
2022-10-14 17:43 ` [PATCH 5/6] net: tftp: use IS_ENABLED(CONFIG_NET_TFTP_VARS) instead of #if Rasmus Villemoes
2022-10-16 18:28   ` Ramon Fried
2022-10-17  6:18     ` Rasmus Villemoes
2022-11-28 19:51   ` Tom Rini
2022-10-14 17:43 ` [PATCH 6/6] net: tftp: sanitize tftp block size, especially for TX Rasmus Villemoes
2022-10-16 18:30   ` Ramon Fried
2022-11-28 19:51   ` Tom Rini
2022-10-15 12:57 ` [PATCH 0/6] broken CVE fix (b85d130ea0ca) Fabio Estevam
2022-10-17  7:52 ` [PATCH 7/6] net: deal with fragment-overlapping-two-holes case Rasmus Villemoes
2022-11-28 19:52   ` Tom Rini [this message]
2022-11-14  9:35 ` [PATCH 0/6] broken CVE fix (b85d130ea0ca) Rasmus Villemoes
2022-11-14 13:04   ` Tom Rini
2022-11-17  0:32     ` Fabio Estevam
2022-11-28  8:10       ` Rasmus Villemoes

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=20221128195203.GI3787616@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=festevam@denx.de \
    --cc=joe.hershberger@ni.com \
    --cc=nicolas.bidron@nccgroup.com \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=rfried.dev@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox