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 10:58:16 +0100 [thread overview]
Message-ID: <2026120244-cobalt-violet-de41@gregkh> (raw)
In-Reply-To: <CAKxU2N8LBAqtROLKSUpBPXiEKyG2NLnZQyNGM1yjiRKZsKWFEw@mail.gmail.com>
On Wed, Dec 02, 2026 at 01:52:34AM -0800, Rosen Penev wrote:
> On Tue, Dec 1, 2026 at 11:37 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > 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.
> I think all my commits with Fixes: tags have been backported. Even
> some without. I'll resend just in case.
You got lucky, AND you did not get any notification if things failed to
apply properly. That's why the documentation says you HAVE to put a cc:
stable if you want it backported.
thanks,
greg k-h
prev parent reply other threads:[~2026-12-02 9:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 21:55 [PATCH v2] nvmem: brcm_nvram: don't cut NVRAM data shorter than its header length Rosen Penev
2026-12-01 13:55 ` Srinivas Kandagatla
2026-12-02 4:09 ` Rosen Penev
2026-12-02 7:37 ` Greg Kroah-Hartman
2026-12-02 9:52 ` Rosen Penev
2026-12-02 9:58 ` Greg Kroah-Hartman [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=2026120244-cobalt-violet-de41@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 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.