UBSAN: undefined-behaviour in init_sb

6 views
Skip to first unread message

syzbot

unread,
Sep 26, 2020, 7:47:18 PM9/26/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 10ad6cfd Linux 4.19.148
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=11421d03900000
kernel config: https://syzkaller.appspot.com/x/.config?x=ef9a7978d84ee42b
dashboard link: https://syzkaller.appspot.com/bug?extid=07c79ba5f89db0967309
compiler: gcc (GCC) 10.1.0-syz 20200507

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+07c79b...@syzkaller.appspotmail.com

IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
device wlan1 left promiscuous mode
gfs2: fsid=syz:syz: Now mounting FS...
================================================================================
UBSAN: Undefined behaviour in fs/gfs2/ops_fstype.c:288:19
shift exponent 536870915 is too large for 64-bit type 'long unsigned int'
CPU: 1 PID: 5992 Comm: syz-executor.2 Not tainted 4.19.148-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+0x22c/0x33e lib/dump_stack.c:118
ubsan_epilogue+0xe/0x3a lib/ubsan.c:161
__ubsan_handle_shift_out_of_bounds.cold+0x1c4/0x250 lib/ubsan.c:422
gfs2_read_sb fs/gfs2/ops_fstype.c:288 [inline]
init_sb.cold+0x52/0x125 fs/gfs2/ops_fstype.c:469
fill_super+0x174d/0x2680 fs/gfs2/ops_fstype.c:1120
gfs2_mount+0x4c0/0x598 fs/gfs2/ops_fstype.c:1312
mount_fs+0xa3/0x318 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2469 [inline]
do_mount+0x51c/0x2f10 fs/namespace.c:2799
ksys_mount+0xcf/0x130 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3026
do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x460bca
Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 dd 87 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 ba 87 fb ff c3 66 0f 1f 84 00 00 00 00 00
RSP: 002b:00007f68bfa4da88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f68bfa4db20 RCX: 0000000000460bca
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f68bfa4dae0
RBP: 00007f68bfa4dae0 R08: 00007f68bfa4db20 R09: 0000000020000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000000
R13: 0000000020000100 R14: 0000000020000200 R15: 0000000020047a20
================================================================================
BTRFS error (device loop1): unsupported checksum algorithm 3
device wlan1 left promiscuous mode
BTRFS error (device loop1): superblock checksum mismatch
BTRFS error (device loop1): open_ctree failed
gfs2: fsid=syz:syz: FS block size (6296577) is too big for machine page size (4096)
BTRFS error (device loop1): unsupported checksum algorithm 3
BTRFS error (device loop1): superblock checksum mismatch
BTRFS error (device loop1): open_ctree failed
BTRFS error (device loop1): unsupported checksum algorithm 3
BTRFS error (device loop1): superblock checksum mismatch
BTRFS error (device loop1): open_ctree failed
device wlan1 entered promiscuous mode
IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
device wlan1 entered promiscuous mode
IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
device wlan1 left promiscuous mode
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS...
gfs2: fsid=syz:syz: FS block size (6300673) is too big for machine page size (4096)
device wlan1 entered promiscuous mode
IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS...
gfs2: fsid=syz:syz: FS block size (6300673) is too big for machine page size (4096)
device wlan1 left promiscuous mode
BTRFS error (device loop1): unsupported checksum algorithm 3
BTRFS error (device loop1): superblock checksum mismatch
BTRFS error (device loop1): open_ctree failed
device wlan1 entered promiscuous mode
BTRFS error (device loop1): unsupported checksum algorithm 3
IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
BTRFS error (device loop1): superblock checksum mismatch
BTRFS error (device loop1): open_ctree failed
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS...
gfs2: fsid=syz:syz: FS block size (6304769) is too big for machine page size (4096)
device wlan1 left promiscuous mode
BTRFS error (device loop1): unsupported checksum algorithm 3
BTRFS error (device loop1): superblock checksum mismatch
BTRFS error (device loop1): open_ctree failed
BTRFS error (device loop1): unsupported checksum algorithm 3
BTRFS error (device loop1): superblock checksum mismatch
BTRFS error (device loop1): open_ctree failed
device wlan1 entered promiscuous mode
IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS...
gfs2: fsid=syz:syz: FS block size (6308865) is too big for machine page size (4096)
IPVS: stopping backup sync thread 6223 ...
IPVS: sync thread started: state = BACKUP, mcast_ifn = veth0_to_bond, syncid = 0, id = 0
IPVS: sync thread started: state = BACKUP, mcast_ifn = veth0_to_bond, syncid = 0, id = 0
IPVS: stopping backup sync thread 6236 ...
IPVS: stopping backup sync thread 6256 ...
IPVS: sync thread started: state = BACKUP, mcast_ifn = veth0_to_bond, syncid = 0, id = 0
IPVS: stopping backup sync thread 6263 ...
IPVS: sync thread started: state = BACKUP, mcast_ifn = veth0_to_bond, syncid = 0, id = 0
IPVS: sync thread started: state = BACKUP, mcast_ifn = veth0_to_bond, syncid = 0, id = 0
IPVS: stopping backup sync thread 6273 ...
IPVS: sync thread started: state = BACKUP, mcast_ifn = veth0_to_bond, syncid = 0, id = 0
IPVS: stopping backup sync thread 6289 ...
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
IPVS: stopping backup sync thread 6297 ...
gfs2: fsid=syz:syz: Now mounting FS...
IPVS: sync thread started: state = BACKUP, mcast_ifn = veth0_to_bond, syncid = 0, id = 0
gfs2: fsid=syz:syz: FS block size (16512) is too big for machine page size (4096)
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS...
gfs2: fsid=syz:syz: FS block size (16512) is too big for machine page size (4096)
IPVS: stopping backup sync thread 6326 ...
IPVS: sync thread started: state = BACKUP, mcast_ifn = veth0_to_bond, syncid = 0, id = 0
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS...
gfs2: fsid=syz:syz.0: fatal: invalid metadata block
bh = 2072 (type: exp=4, found=8)
function = gfs2_meta_indirect_buffer, file = fs/gfs2/meta_io.c, line = 419
gfs2: fsid=syz:syz.0: about to withdraw this file system
gfs2: fsid=syz:syz.0: withdrawn
CPU: 0 PID: 6346 Comm: syz-executor.2 Not tainted 4.19.148-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+0x22c/0x33e lib/dump_stack.c:118
gfs2_lm_withdraw.cold+0x204/0x258 fs/gfs2/util.c:75
gfs2_metatype_check_ii+0x6a/0xb0 fs/gfs2/util.c:224
gfs2_metatype_check_i fs/gfs2/util.h:114 [inline]
gfs2_meta_indirect_buffer+0x261/0x400 fs/gfs2/meta_io.c:419
gfs2_meta_inode_buffer fs/gfs2/meta_io.h:73 [inline]
gfs2_inode_refresh+0x95/0xe10 fs/gfs2/glops.c:412
inode_go_lock+0x234/0x493 fs/gfs2/glops.c:442
do_promote+0x46f/0xdd0 fs/gfs2/glock.c:362
finish_xmote+0x478/0xdd0 fs/gfs2/glock.c:522
do_xmote+0x538/0x680 fs/gfs2/glock.c:590
run_queue+0x24f/0x5a0 fs/gfs2/glock.c:655
gfs2_glock_nq+0x7a2/0x14d0 fs/gfs2/glock.c:1113
gfs2_glock_nq_init fs/gfs2/glock.h:228 [inline]
gfs2_lookupi+0x2fd/0x610 fs/gfs2/inode.c:301
gfs2_lookup_simple+0x99/0xe0 fs/gfs2/inode.c:252
init_journal fs/gfs2/ops_fstype.c:648 [inline]
init_inodes+0x2fc/0x1ee0 fs/gfs2/ops_fstype.c:779
fill_super+0x190e/0x2680 fs/gfs2/ops_fstype.c:1149
gfs2_mount+0x4c0/0x598 fs/gfs2/ops_fstype.c:1312
mount_fs+0xa3/0x318 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2469 [inline]
do_mount+0x51c/0x2f10 fs/namespace.c:2799
ksys_mount+0xcf/0x130 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3026
do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x460bca
Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 dd 87 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 ba 87 fb ff c3 66 0f 1f 84 00 00 00 00 00
RSP: 002b:00007f68bfa4da88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f68bfa4db20 RCX: 0000000000460bca
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f68bfa4dae0
RBP: 00007f68bfa4dae0 R08: 00007f68bfa4db20 R09: 0000000020000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000000
R13: 0000000020000100 R14: 0000000020000200 R15: 0000000020047a20
gfs2: fsid=syz:syz.0: can't lookup journal index: 0
xt_ct_set_helper: 4 callbacks suppressed
xt_CT: No such helper "snmp_trap"
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS...
gfs2: fsid=syz:syz: FS block size (4098) is too big for machine page size (4096)
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS...
gfs2: fsid=syz:syz: FS block size (4098) is too big for machine page size (4096)
xt_CT: No such helper "snmp_trap"
xt_CT: No such helper "snmp_trap"
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS...
gfs2: fsid=syz:syz: FS block size (4099) is too big for machine page size (4096)
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS...
gfs2: fsid=syz:syz: FS block size (4099) is too big for machine page size (4096)
xt_CT: No such helper "snmp_trap"
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS...
gfs2: fsid=syz:syz: FS block size (4100) is too big for machine page size (4096)
BTRFS error (device loop1): unsupported checksum algorithm 3
BTRFS error (device loop1): superblock checksum mismatch
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
BTRFS error (device loop1): open_ctree failed
gfs2: fsid=syz:syz: Now mounting FS...
gfs2: fsid=syz:syz: FS block size (4101) is too big for machine page size (4096)
BTRFS error (device loop1): unsupported checksum algorithm 3
BTRFS error (device loop1): superblock checksum mismatch
BTRFS error (device loop1): open_ctree failed
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS...
gfs2: fsid=syz:syz: FS block size (4101) is too big for machine page size (4096)
gfs2: fsid=syz:syz: Trying to join cluster "lock_nolock", "syz:syz"
gfs2: fsid=syz:syz: Now mounting FS...
gfs2: fsid=syz:syz: FS block size (4102) is too big for machine page size (4096)
BTRFS error (device loop1): unsupported checksum algorithm 3
BTRFS error (device loop1): superblock checksum mismatch
BTRFS error (device loop1): open_ctree failed


---
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

unread,
Sep 29, 2020, 8:28:23 AM9/29/20
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 10ad6cfd Linux 4.19.148
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=168f48a7900000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=133070a7900000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14359d4b900000

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

audit: type=1400 audit(1601382360.126:8): avc: denied { execmem } for pid=6487 comm="syz-executor778" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process permissive=1
gfs2: fsid=loop0: Trying to join cluster "lock_nolock", "loop0"
gfs2: fsid=loop0: Now mounting FS...
================================================================================
UBSAN: Undefined behaviour in fs/gfs2/ops_fstype.c:288:19
shift exponent 4294967287 is too large for 64-bit type 'long unsigned int'
CPU: 1 PID: 6487 Comm: syz-executor778 Not tainted 4.19.148-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+0x22c/0x33e lib/dump_stack.c:118
ubsan_epilogue+0xe/0x3a lib/ubsan.c:161
__ubsan_handle_shift_out_of_bounds.cold+0x1c4/0x250 lib/ubsan.c:422
gfs2_read_sb fs/gfs2/ops_fstype.c:288 [inline]
init_sb.cold+0x52/0x125 fs/gfs2/ops_fstype.c:469
fill_super+0x174d/0x2680 fs/gfs2/ops_fstype.c:1120
gfs2_mount+0x4c0/0x598 fs/gfs2/ops_fstype.c:1312
mount_fs+0xa3/0x318 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2469 [inline]
do_mount+0x51c/0x2f10 fs/namespace.c:2799
ksys_mount+0xcf/0x130 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3026
do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
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:00007ffc2bba29a8 EFLAGS: 00000293 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffc2bba2a00 RCX: 0000000000446dba
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffc2bba29c0
RBP: 00007ffc2bba29c0 R08: 00007ffc2bba2a00 R09: 00007ffc00000015
R10: 0000000002200000 R11: 0000000000000293 R12: 0000000000000001
R13: 0000000000000004 R14: 0000000000000003 R15: 0000000000000003
================================================================================
================================================================================
UBSAN: Undefined behaviour in fs/gfs2/ops_fstype.c:332:21
index 11 is out of range for type 'u64 [11]'
CPU: 1 PID: 6487 Comm: syz-executor778 Not tainted 4.19.148-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+0x22c/0x33e lib/dump_stack.c:118
ubsan_epilogue+0xe/0x3a lib/ubsan.c:161
__ubsan_handle_out_of_bounds.cold+0x63/0x6f lib/ubsan.c:383
gfs2_read_sb fs/gfs2/ops_fstype.c:332 [inline]
init_sb+0xd35/0xe60 fs/gfs2/ops_fstype.c:469
fill_super+0x174d/0x2680 fs/gfs2/ops_fstype.c:1120
gfs2_mount+0x4c0/0x598 fs/gfs2/ops_fstype.c:1312
mount_fs+0xa3/0x318 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2469 [inline]
do_mount+0x51c/0x2f10 fs/namespace.c:2799
ksys_mount+0xcf/0x130 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3026
do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
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:00007ffc2bba29a8 EFLAGS: 00000293 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffc2bba2a00 RCX: 0000000000446dba
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffc2bba29c0
RBP: 00007ffc2bba29c0 R08: 00007ffc2bba2a00 R09: 00007ffc00000015
R10: 0000000002200000 R11: 0000000000000293 R12: 0000000000000001
R13: 0000000000000004 R14: 0000000000000003 R15: 0000000000000003
================================================================================
================================================================================
UBSAN: Undefined behaviour in fs/gfs2/ops_fstype.c:326:29
index 11 is out of range for type 'u64 [11]'
CPU: 1 PID: 6487 Comm: syz-executor778 Not tainted 4.19.148-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+0x22c/0x33e lib/dump_stack.c:118
ubsan_epilogue+0xe/0x3a lib/ubsan.c:161
__ubsan_handle_out_of_bounds.cold+0x63/0x6f lib/ubsan.c:383
gfs2_read_sb fs/gfs2/ops_fstype.c:326 [inline]
init_sb+0xcd6/0xe60 fs/gfs2/ops_fstype.c:469
fill_super+0x174d/0x2680 fs/gfs2/ops_fstype.c:1120
gfs2_mount+0x4c0/0x598 fs/gfs2/ops_fstype.c:1312
mount_fs+0xa3/0x318 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2469 [inline]
do_mount+0x51c/0x2f10 fs/namespace.c:2799
ksys_mount+0xcf/0x130 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3026
do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
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:00007ffc2bba29a8 EFLAGS: 00000293 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffc2bba2a00 RCX: 0000000000446dba
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffc2bba29c0
RBP: 00007ffc2bba29c0 R08: 00007ffc2bba2a00 R09: 00007ffc00000015
R10: 0000000002200000 R11: 0000000000000293 R12: 0000000000000001
R13: 0000000000000004 R14: 0000000000000003 R15: 0000000000000003
================================================================================
================================================================================
UBSAN: Undefined behaviour in fs/gfs2/ops_fstype.c:330:30
index 11 is out of range for type 'u64 [11]'
CPU: 1 PID: 6487 Comm: syz-executor778 Not tainted 4.19.148-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+0x22c/0x33e lib/dump_stack.c:118
ubsan_epilogue+0xe/0x3a lib/ubsan.c:161
__ubsan_handle_out_of_bounds.cold+0x63/0x6f lib/ubsan.c:383
gfs2_read_sb fs/gfs2/ops_fstype.c:330 [inline]
init_sb+0xcef/0xe60 fs/gfs2/ops_fstype.c:469
fill_super+0x174d/0x2680 fs/gfs2/ops_fstype.c:1120
gfs2_mount+0x4c0/0x598 fs/gfs2/ops_fstype.c:1312
mount_fs+0xa3/0x318 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2469 [inline]
do_mount+0x51c/0x2f10 fs/namespace.c:2799
ksys_mount+0xcf/0x130 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3026
do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
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:00007ffc2bba29a8 EFLAGS: 00000293 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffc2bba2a00 RCX: 0000000000446dba
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffc2bba29c0
RBP: 00007ffc2bba29c0 R08: 00007ffc2bba2a00 R09: 00007ffc00000015
R10: 0000000002200000 R11: 0000000000000293 R12: 0000000000000001
R13: 0000000000000004 R14: 0000000000000003 R15: 0000000000000003
================================================================================
==================================================================
BUG: KASAN: slab-out-of-bounds in gfs2_read_sb fs/gfs2/ops_fstype.c:332 [inline]
BUG: KASAN: slab-out-of-bounds in init_sb+0xd3f/0xe60 fs/gfs2/ops_fstype.c:469
Write of size 8 at addr ffff8880a4249f28 by task syz-executor778/6487

CPU: 1 PID: 6487 Comm: syz-executor778 Not tainted 4.19.148-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+0x22c/0x33e lib/dump_stack.c:118
print_address_description.cold+0x56/0x25c mm/kasan/report.c:256
kasan_report_error.cold+0x66/0xb9 mm/kasan/report.c:354
kasan_report mm/kasan/report.c:412 [inline]
__asan_report_store8_noabort+0x88/0x90 mm/kasan/report.c:438
gfs2_read_sb fs/gfs2/ops_fstype.c:332 [inline]
init_sb+0xd3f/0xe60 fs/gfs2/ops_fstype.c:469
fill_super+0x174d/0x2680 fs/gfs2/ops_fstype.c:1120
gfs2_mount+0x4c0/0x598 fs/gfs2/ops_fstype.c:1312
mount_fs+0xa3/0x318 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2469 [inline]
do_mount+0x51c/0x2f10 fs/namespace.c:2799
ksys_mount+0xcf/0x130 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3026
do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
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:00007ffc2bba29a8 EFLAGS: 00000293 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffc2bba2a00 RCX: 0000000000446dba
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffc2bba29c0
RBP: 00007ffc2bba29c0 R08: 00007ffc2bba2a00 R09: 00007ffc00000015
R10: 0000000002200000 R11: 0000000000000293 R12: 0000000000000001
R13: 0000000000000004 R14: 0000000000000003 R15: 0000000000000003

Allocated by task 6487:
kmem_cache_alloc_trace+0x12f/0x4b0 mm/slab.c:3625
kmalloc include/linux/slab.h:515 [inline]
kzalloc include/linux/slab.h:709 [inline]
init_sbd fs/gfs2/ops_fstype.c:71 [inline]
fill_super+0xca/0x2680 fs/gfs2/ops_fstype.c:1041
gfs2_mount+0x4c0/0x598 fs/gfs2/ops_fstype.c:1312
mount_fs+0xa3/0x318 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2469 [inline]
do_mount+0x51c/0x2f10 fs/namespace.c:2799
ksys_mount+0xcf/0x130 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3026
do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 0:
(stack is not available)

The buggy address belongs to the object at ffff8880a4248bc0
which belongs to the cache kmalloc-8192 of size 8192
The buggy address is located 4968 bytes inside of
8192-byte region [ffff8880a4248bc0, ffff8880a424abc0)
The buggy address belongs to the page:
page:ffffea0002909200 count:1 mapcount:0 mapping:ffff88812c3f5080 index:0x0 compound_mapcount: 0
flags: 0xfffe0000008100(slab|head)
raw: 00fffe0000008100 ffffea0002125208 ffff88812c3f4b48 ffff88812c3f5080
raw: 0000000000000000 ffff8880a4248bc0 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff8880a4249e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8880a4249e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8880a4249f00: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc
^
ffff8880a4249f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880a424a000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

syzbot

unread,
Nov 28, 2020, 12:11:09 PM11/28/20
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit 6a253f385a2dc9f6a5a1da828e0e9e07f6f9d9b9
Author: Anant Thazhemadam <anant.th...@gmail.com>
Date: Wed Oct 14 16:31:09 2020 +0000

gfs2: add validation checks for size of superblock

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1451d759500000
start commit: 10ad6cfd Linux 4.19.148
git tree: linux-4.19.y
If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: gfs2: add validation checks for size of superblock

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages