UBSAN: array-index-out-of-bounds in init_sb

57 views
Skip to first unread message

syzbot

unread,
Oct 12, 2020, 9:10:22 AM10/12/20
to agru...@redhat.com, cluste...@redhat.com, linux-...@vger.kernel.org, rpet...@redhat.com, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 6f2f486d Merge tag 'spi-fix-v5.9-rc8' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16887cab900000
kernel config: https://syzkaller.appspot.com/x/.config?x=c06bcf3cc963d91c
dashboard link: https://syzkaller.appspot.com/bug?extid=a5e2482a693e6b1e444b
compiler: gcc (GCC) 10.1.0-syz 20200507
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1081031b900000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=133c359f900000

Bisection is inconclusive: the issue happens on the oldest tested release.

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=15f3f320500000
final oops: https://syzkaller.appspot.com/x/report.txt?x=17f3f320500000
console output: https://syzkaller.appspot.com/x/log.txt?x=13f3f320500000

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

gfs2: fsid=loop0: Trying to join cluster "lock_nolock", "loop0"
gfs2: fsid=loop0: Now mounting FS...
================================================================================
UBSAN: array-index-out-of-bounds in fs/gfs2/ops_fstype.c:342:21
index 11 is out of range for type 'u64 [11]'
CPU: 0 PID: 6887 Comm: syz-executor693 Not tainted 5.9.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x198/0x1fd lib/dump_stack.c:118
ubsan_epilogue+0xb/0x5a lib/ubsan.c:148
__ubsan_handle_out_of_bounds.cold+0x62/0x6c lib/ubsan.c:356
gfs2_read_sb fs/gfs2/ops_fstype.c:342 [inline]
init_sb+0xc37/0xd30 fs/gfs2/ops_fstype.c:479
gfs2_fill_super+0x1796/0x254a fs/gfs2/ops_fstype.c:1096
get_tree_bdev+0x421/0x740 fs/super.c:1342
gfs2_get_tree+0x4a/0x270 fs/gfs2/ops_fstype.c:1201
vfs_get_tree+0x89/0x2f0 fs/super.c:1547
do_new_mount fs/namespace.c:2875 [inline]
path_mount+0x1387/0x20a0 fs/namespace.c:3192
do_mount fs/namespace.c:3205 [inline]
__do_sys_mount fs/namespace.c:3413 [inline]
__se_sys_mount fs/namespace.c:3390 [inline]
__x64_sys_mount+0x27f/0x300 fs/namespace.c:3390
do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x446dba
Code: b8 08 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 fd ad fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 da ad fb ff c3 66 0f 1f 84 00 00 00 00 00
RSP: 002b:00007ffcd944f138 EFLAGS: 00000293 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffcd944f190 RCX: 0000000000446dba
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffcd944f150
RBP: 00007ffcd944f150 R08: 00007ffcd944f190 R09: 00007ffc00000015
R10: 0000000002200000 R11: 0000000000000293 R12: 0000000000000001
R13: 0000000000000004 R14: 0000000000000003 R15: 0000000000000003
================================================================================


---
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.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Oct 13, 2020, 10:43:10 AM10/13/20
to anant.th...@gmail.com, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+a5e248...@syzkaller.appspotmail.com

Tested on:

commit: 865c50e1 x86/uaccess: utilize CONFIG_CC_HAS_ASM_GOTO_OUTPUT
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=897b302aa6a735b
dashboard link: https://syzkaller.appspot.com/bug?extid=a5e2482a693e6b1e444b
compiler: gcc (GCC) 10.1.0-syz 20200507
patch: https://syzkaller.appspot.com/x/patch.diff?x=129fd078500000

Note: testing is done by a robot and is best-effort only.

Anant Thazhemadam

unread,
Oct 14, 2020, 3:23:13 PM10/14/20
to syzkaller-bugs

#syz dup: KASAN: slab-out-of-bounds Write in gfs2_fill_super
 

syzbot

unread,
Oct 14, 2020, 3:23:17 PM10/14/20
to Anant Thazhemadam, anant.th...@gmail.com, syzkall...@googlegroups.com
I see the command but can't find the corresponding bug.
Please resend the email to syzbo...@syzkaller.appspotmail.com address
that is the sender of the bug report (also present in the Reported-by tag).

>
>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bug...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/17d0fec5-716b-4b29-9f6c-462ed08556ccn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages