[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202409281335.5EE231B9C7@keescook>
Date: Sat, 28 Sep 2024 13:50:12 -0700
From: Kees Cook <kees@...nel.org>
To: Bill Wendling <morbo@...gle.com>
Cc: Ard Biesheuvel <ardb@...nel.org>, Jan Hendrik Farr <kernel@...rr.cc>,
Thorsten Blum <thorsten.blum@...lux.com>, kent.overstreet@...ux.dev,
regressions@...ts.linux.dev, linux-bcachefs@...r.kernel.org,
linux-hardening@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [REGRESSION][BISECTED] erroneous buffer overflow detected in
bch2_xattr_validate
On Thu, Sep 26, 2024 at 06:30:15PM -0700, Bill Wendling wrote:
> On Thu, Sep 26, 2024 at 3:18 PM Bill Wendling <morbo@...gle.com> wrote:
> >
> > On Thu, Sep 26, 2024 at 12:58 PM Ard Biesheuvel <ardb@...nel.org> wrote:
> > >
> > > (cc Kees and Bill)
> > >
> > > On Thu, 26 Sept 2024 at 19:46, Jan Hendrik Farr <kernel@...rr.cc> wrote:
> > > >
> > > > On 26 19:01:20, Jan Hendrik Farr wrote:
> > > > > On 26 18:09:57, Thorsten Blum wrote:
> > > > > > On 26. Sep 2024, at 17:28, Thorsten Blum <thorsten.blum@...lux.com> wrote:
> > > > > > > On 26. Sep 2024, at 17:14, Jan Hendrik Farr <kernel@...rr.cc> wrote:
> [...]
> > > > > > >> [ 6.252375] memchr: detected buffer overflow: 12 byte read of buffer size 0
> [...]
> > > > > bkey_fsck_err_on(memchr(xattr.v->x_name, '\0', xattr.v->x_name_len),
> > > > > c, xattr_name_invalid_chars,
> > > > > "xattr name has invalid characters");
> [...]
The thing going wrong is that __bdos(xattr.v->x_name, 0) is returning 0.
This looks exactly like the bug I minimized here:
https://lore.kernel.org/all/202409170436.C3C6E7F7A@keescook/
Since there wasn't an LLVM open bug yet, I've created:
https://github.com/llvm/llvm-project/issues/110385
-Kees
--
Kees Cook
Powered by blists - more mailing lists