From: Andrew Morton <akpm@linux-foundation.org>
To: Yury Norov <yury.norov@gmail.com>
Cc: syzbot <syzbot+08ca1fa706a22cc17efe@syzkaller.appspotmail.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-next@vger.kernel.org, sfr@canb.auug.org.au,
syzkaller-bugs@googlegroups.com,
Andrey Ryabinin <ryabinin.a.a@gmail.com>,
Alexander Potapenko <glider@google.com>,
Andrey Konovalov <andreyknvl@gmail.com>,
Dmitry Vyukov <dvyukov@google.com>,
Vincenzo Frascino <vincenzo.frascino@arm.com>
Subject: Re: [syzbot] linux-next boot error: KASAN: slab-out-of-bounds Read in _find_next_bit
Date: Tue, 6 Sep 2022 22:53:12 -0700 [thread overview]
Message-ID: <20220906225312.263c4493a744cbcb66288283@linux-foundation.org> (raw)
In-Reply-To: <YxfpkzZhJ7GfRuKd@yury-laptop>
On Tue, 6 Sep 2022 17:45:07 -0700 Yury Norov <yury.norov@gmail.com> wrote:
> > > The buggy address belongs to the object at ffff888017576600
> > > which belongs to the cache kmalloc-192 of size 192
> > > The buggy address is located 184 bytes inside of
> > > 192-byte region [ffff888017576600, ffff8880175766c0)
> >
> > At offset 184 of a 192-byte region.
> >
> > So what's wrong with doing that? Does KASAN have an off-by-one?
>
> Hi Andrew, all,
>
> This is a bug in FIND_NEXT_BIT(). It should be
> if (idx >= sz / BITS_PER_LONG) \
> goto out; \
>
> instead of
> if (idx > sz / BITS_PER_LONG) \
> goto out; \
>
> The fix is in bitmap-for-next, expected to be in -next by tomorrow.
> Sorry for the noise.
OK... but why is KASAN reporting a bad access from an area
which appears to be OK?
next prev parent reply other threads:[~2022-09-07 5:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 13:21 [syzbot] linux-next boot error: KASAN: slab-out-of-bounds Read in _find_next_bit syzbot
2022-09-07 0:31 ` Andrew Morton
2022-09-07 0:45 ` Yury Norov
2022-09-07 5:53 ` Andrew Morton [this message]
2022-09-07 7:17 ` Dmitry Vyukov
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=20220906225312.263c4493a744cbcb66288283@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-next@vger.kernel.org \
--cc=ryabinin.a.a@gmail.com \
--cc=sfr@canb.auug.org.au \
--cc=syzbot+08ca1fa706a22cc17efe@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=vincenzo.frascino@arm.com \
--cc=yury.norov@gmail.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;
as well as URLs for NNTP newsgroup(s).