Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Fang Xieyan <fangxy@xiaopeng.com>
Cc: richard@nod.at,  vigneshr@ti.com,  linux-mtd@lists.infradead.org,
	linux-kernel@vger.kernel.org,  stable@vger.kernel.org
Subject: Re: [PATCH] mtd: mtdpart: fix overflow check for partition offset and size
Date: Thu, 03 Dec 2026 11:00:43 +0100	[thread overview]
Message-ID: <87se0ek7jo.fsf@bootlin.com> (raw)
In-Reply-To: <20261203080547.15619-1-fangxy@xiaopeng.com> (Fang Xieyan's message of "Thu, 3 Dec 2026 16:05:47 +0800")

Hi,

On 03/12/2026 at 16:05:47 +08, Fang Xieyan <fangxy@xiaopeng.com> wrote:

> allocate_partition() checks whether a partition extends beyond its
> parent by adding the partition offset and size.  Both values are u64,
> so the addition can overflow and wrap to a value smaller than the
> parent size.

The day you see an 8 Zetta bytes flash, you're gonna have many more
issues than this one.

MTD maintainers, shall we take this kind of over denfensive fix? The
diff is minimal, so I'm not bothered by the change besides the fact that
I don't think it is in any way useful.

Thanks,
Miquèl

      reply	other threads:[~2026-12-03 10:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03  8:05 [PATCH] mtd: mtdpart: fix overflow check for partition offset and size Fang Xieyan
2026-12-03 10:00 ` Miquel Raynal [this message]

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=87se0ek7jo.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=fangxy@xiaopeng.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=stable@vger.kernel.org \
    --cc=vigneshr@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox