syzbot


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

Status: closed as dup on 2020/10/14 19:24
Subsystems: gfs2
[Documentation on labels]
Reported-by: syzbot+a5e2482a693e6b1e444b@syzkaller.appspotmail.com
First crash: 1294d, last: 1293d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: KASAN: slab-out-of-bounds Write in init_sb (log)
Repro: C syz .config
  
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
KASAN: slab-out-of-bounds Write in gfs2_fill_super gfs2 C done 1 1304d 1303d
Discussions (4)
Title Replies (including bot) Last reply
[PATCH v2] fs: gfs2: add validation checks for size of superblock 2 (2) 2020/10/14 19:00
[PATCH] fs: gfs2: prevent OOB access in gfs2_read_sb() 4 (4) 2020/10/14 13:25
KASAN: slab-out-of-bounds Write in gfs2_fill_super 4 (5) 2020/10/14 13:16
UBSAN: array-index-out-of-bounds in init_sb 0 (1) 2020/10/12 13:10
Last patch testing requests (1)
Created Duration User Patch Repo Result
2020/10/13 13:18 17m anant.thazhemadam@gmail.com patch upstream OK

Sample crash report:
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: 6858 Comm: syz-executor016 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:00007fff576c7778 EFLAGS: 00000293 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fff576c77d0 RCX: 0000000000446dba
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fff576c7790
RBP: 00007fff576c7790 R08: 00007fff576c77d0 R09: 00007fff00000015
R10: 0000000002200000 R11: 0000000000000293 R12: 0000000000000001
R13: 0000000000000004 R14: 0000000000000003 R15: 0000000000000003
================================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/10/11 08:35 upstream da690031a5d6 4a77ae0b .config console log report syz C ci-upstream-kasan-gce-root
2020/10/10 08:11 upstream 6f2f486d57c4 93817d89 .config console log report syz C ci-upstream-kasan-gce-selinux-root
* Struck through repros no longer work on HEAD.