[gfs2?] KASAN: stack-out-of-bounds Write in gfs2_block_map

7 views
Skip to first unread message

syzbot

unread,
Dec 25, 2022, 10:09:39 PM12/25/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c4215ee4771b Linux 4.14.302
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1355fb50480000
kernel config: https://syzkaller.appspot.com/x/.config?x=4a9988fe055c9527
dashboard link: https://syzkaller.appspot.com/bug?extid=8986c0959b371872ed17
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14a69bd8480000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1157d922480000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c93ba055d204/disk-c4215ee4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/bfbc929a33c1/vmlinux-c4215ee4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/444658051770/bzImage-c4215ee4.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/55276343240c/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+8986c0...@syzkaller.appspotmail.com

gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS...
==================================================================
BUG: KASAN: stack-out-of-bounds in find_metapath fs/gfs2/bmap.c:239 [inline]
BUG: KASAN: stack-out-of-bounds in gfs2_block_map+0x240b/0x2de0 fs/gfs2/bmap.c:695
Write of size 2 at addr ffff88809ca976a0 by task syz-executor247/7967

CPU: 0 PID: 7967 Comm: syz-executor247 Not tainted 4.14.302-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1b2/0x281 lib/dump_stack.c:58
print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351
kasan_report mm/kasan/report.c:409 [inline]
__asan_report_store2_noabort+0x68/0x70 mm/kasan/report.c:433
find_metapath fs/gfs2/bmap.c:239 [inline]
gfs2_block_map+0x240b/0x2de0 fs/gfs2/bmap.c:695
gfs2_write_alloc_required+0x2dc/0x3c0 fs/gfs2/bmap.c:1693
gfs2_jdesc_check+0x174/0x220 fs/gfs2/super.c:367
init_journal fs/gfs2/ops_fstype.c:732 [inline]
init_inodes+0x110b/0x18d0 fs/gfs2/ops_fstype.c:807
fill_super+0x1721/0x2310 fs/gfs2/ops_fstype.c:1177
gfs2_mount+0x439/0x510 fs/gfs2/ops_fstype.c:1340
mount_fs+0x92/0x2a0 fs/super.c:1237
vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
vfs_kern_mount fs/namespace.c:1036 [inline]
do_new_mount fs/namespace.c:2572 [inline]
do_mount+0xe65/0x2a30 fs/namespace.c:2905
SYSC_mount fs/namespace.c:3121 [inline]
SyS_mount+0xa8/0x120 fs/namespace.c:3098
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7fdd19910ada
RSP: 002b:00007fff18650f18 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fdd19910ada
RDX: 0000000020037f40 RSI: 0000000020037f80 RDI: 00007fff18650f20
RBP: 00007fff18650f20 R08: 00007fff18650f60 R09: 0000000000043350
R10: 0000000002000011 R11: 0000000000000282 R12: 0000000000000004
R13: 00005555559902c0 R14: 00007fff18650f60 R15: 0000000000000000

The buggy address belongs to the page:
page:ffffea000272a5c0 count:0 mapcount:0 mapping: (null) index:0x0
flags: 0xfff00000000000()
raw: 00fff00000000000 0000000000000000 0000000000000000 00000000ffffffff
raw: 0000000000000000 0000000100000001 0000000000000000 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff88809ca97580: 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1
ffff88809ca97600: f1 00 00 00 f2 f2 f2 00 00 00 00 00 00 00 00 00
>ffff88809ca97680: 00 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 00 00 00
^
ffff88809ca97700: 00 00 f1 f1 f1 f1 f1 f1 00 00 00 00 00 00 00 00
ffff88809ca97780: 00 00 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 00 00
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages