linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: syzbot <syzbot+5867885efe39089b339b@syzkaller.appspotmail.com>,
	 linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-mm@kvack.org, syzkaller-bugs@googlegroups.com,
	willy@infradead.org
Subject: Re: [syzbot] UBSAN: array-index-out-of-bounds in truncate_inode_pages_range
Date: Mon, 5 Sep 2022 11:47:07 +0200	[thread overview]
Message-ID: <CACT4Y+YQmenC6KOZEQ0o3n+qQXTEwUcAnvm+nTUXz_nO_A91ng@mail.gmail.com> (raw)
In-Reply-To: <20220901162459.431c49b3925e99ddb448e1b3@linux-foundation.org>

On Fri, 2 Sept 2022 at 01:25, Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Wed, 31 Aug 2022 17:13:36 -0700 syzbot <syzbot+5867885efe39089b339b@syzkaller.appspotmail.com> wrote:
>
> > Hello,
> >
> > syzbot found the following issue on:
> >
> > HEAD commit:    89b749d8552d Merge tag 'fbdev-for-6.0-rc3' of git://git.ke..
> > git tree:       upstream
> > console output: https://syzkaller.appspot.com/x/log.txt?x=14b9661b080000
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=911efaff115942bb
> > dashboard link: https://syzkaller.appspot.com/bug?extid=5867885efe39089b339b
> > compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> > userspace arch: i386
> >
> > Unfortunately, I don't have any reproducer for this issue yet.
> >
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+5867885efe39089b339b@syzkaller.appspotmail.com
> >
> > ntfs3: loop0: Different NTFS' sector size (1024) and media sector size (512)
> > ntfs3: loop0: RAW NTFS volume: Filesystem size 0.00 Gb > volume size 0.00 Gb. Mount in read-only
> > ================================================================================
> > UBSAN: array-index-out-of-bounds in mm/truncate.c:366:18
> > index 254 is out of range for type 'long unsigned int [15]'
>
> That's
>
>                 index = indices[folio_batch_count(&fbatch) - 1] + 1;
>
> I looked.  I see no way in which fbatch.nr got a value of 255.
>
>
> I must say, the the code looks rather hacky.  Isn't there a more
> type-friendly way of doing this?

I don't see how this can happen either. Also can't reproduce.
It's happened only once so far, so maybe some silent memory corruption.
Let's wait for more crashes/reproducer, or otherwise syzbot will
auto-close it after some time.


  reply	other threads:[~2022-09-05  9:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <000000000000117c7505e7927cb4@google.com>
2022-09-01 23:24 ` Andrew Morton
2022-09-05  9:47   ` Dmitry Vyukov [this message]
2022-10-08 19:12   ` Matthew Wilcox
2022-10-10 16:19     ` Vishal Moola
2022-10-08 18:49 ` syzbot

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=CACT4Y+YQmenC6KOZEQ0o3n+qQXTEwUcAnvm+nTUXz_nO_A91ng@mail.gmail.com \
    --to=dvyukov@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=syzbot+5867885efe39089b339b@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=willy@infradead.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