Re: [syzbot] KASAN: slab-out-of-bounds Write in dbgfs_rm_context_write

From: SeongJae Park
Date: Mon Oct 31 2022 - 14:30:37 EST


Hello,

On Sun, 30 Oct 2022 18:44:35 -0700 syzbot <syzbot+6087eafb76a94c4ac9eb@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 98555239e4c3 Merge tag 'arc-6.1-fixes' of git://git.kernel..
> git tree: upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=12508922880000
> kernel config: https://syzkaller.appspot.com/x/.config?x=a66c6c673fb555e8
> dashboard link: https://syzkaller.appspot.com/bug?extid=6087eafb76a94c4ac9eb
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=167e3f4a880000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1262cb86880000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/b9ab8f713204/disk-98555239.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/5efa1b178038/vmlinux-98555239.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/83329b87f1a8/bzImage-98555239.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+6087eafb76a94c4ac9eb@xxxxxxxxxxxxxxxxxxxxxxxxx
>
> general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN
> KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
> CPU: 1 PID: 3603 Comm: syz-executor414 Not tainted 6.1.0-rc2-syzkaller-00078-g98555239e4c3 #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022
> RIP: 0010:dbgfs_rm_context mm/damon/dbgfs.c:928 [inline]
> RIP: 0010:dbgfs_rm_context_write+0x2e3/0x4d0 mm/damon/dbgfs.c:971

Thank you for this report. I just posted a patchset[1] for the fix and
selftest repro of this bug.

[1] https://lore.kernel.org/damon/20221031182554.7882-1-sj@xxxxxxxxxx/

Thanks,
SJ

[...]