mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Rosen Penev <rosenp@gmail.com>
Cc: Srinivas Kandagatla <srini@kernel.org>,
	linux-kernel@vger.kernel.org, egc112@msn.com
Subject: Re: [PATCH v2] nvmem: brcm_nvram: don't cut NVRAM data shorter than its header length
Date: Wed, 2 Dec 2026 08:37:42 +0100	[thread overview]
Message-ID: <2026120217-jumble-deluge-0ea0@gregkh> (raw)
In-Reply-To: <CAKxU2N9N7O782LnKFc7qB1XUc0UK96AiwcFVwGm6WMb1r0XF2w@mail.gmail.com>

On Tue, Dec 01, 2026 at 08:09:43PM -0800, Rosen Penev wrote:
> On Tue, Dec 1, 2026 at 5:55 AM Srinivas Kandagatla <srini@kernel.org> wrote:
> >
> >
> >
> > On 11/29/26 9:55 PM, Rosen Penev wrote:
> > > brcm_nvram_copy_data() sizes the data by stripping trailing bytes that
> > > equal the last byte of the region. NVRAM content itself ends with NUL
> > > bytes, so when the region is padded with 0x00 instead of erased 0xff,
> > > the loop also strips the end of the content. Since
> > > commit a67e2c323a47 ("nvmem: brcm_nvram: fix out-of-bounds access on malformed flash data")
> > > the header length is checked against that size, and such NVRAM is now
> > > rejected. On an ASUS RT-N16, whose CFE pads NVRAM with zeros:
> > >
> > >   brcm_nvram 1dff8000.nvram: NVRAM length (2600) exceeds data size (2596)
> > >
> > > Extend the data to the length in the header when that fits in the
> > > mapped region. The buffer still covers every byte the parser reads,
> > > so the out-of-bounds protection is kept.
> > >
> > > Fixes: a67e2c323a47 ("nvmem: brcm_nvram: fix out-of-bounds access on malformed flash data")
> >
> > CC Stable missing.
> Is that seriously it? The bots will backport it anyway.

Maybe, maybe not.  You are taking a chance we will not do it unless cc:
stable is really there.

  reply	other threads:[~2026-12-02  7:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29 21:55 Rosen Penev
2026-12-01 13:55 ` Srinivas Kandagatla
2026-12-02  4:09   ` Rosen Penev
2026-12-02  7:37     ` Greg Kroah-Hartman [this message]
2026-12-02  9:52       ` Rosen Penev
2026-12-02  9:58         ` Greg Kroah-Hartman

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=2026120217-jumble-deluge-0ea0@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=egc112@msn.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rosenp@gmail.com \
    --cc=srini@kernel.org \
    /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

all inboxes | Powered by JetHome®