syzbot


BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue

Status: fixed on 2018/11/12 21:25
Reported-by: syzbot+83e8cbe702263932d9d4@syzkaller.appspotmail.com
Fix commit: e01ad46d53b5 blk-mq: fallback to previous nr_hw_queues when updating fails
First crash: 1371d, last: 1349d
similar bugs (4):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue C done 20 925d 1163d 1/1 fixed on 2019/12/16 09:09
linux-4.19 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue (2) C error 15 22d 925d 0/1 upstream: reported C repro on 2019/12/15 04:28
linux-4.14 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue (2) C 11 22d 880d 0/1 upstream: reported C repro on 2020/01/29 04:42
linux-4.19 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue C done 12 972d 1157d 1/1 fixed on 2019/12/14 05:59

Sample crash report:
RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 000000000044a429
RDX: 0000000000000002 RSI: 000000000000ab03 RDI: 0000000000000004
RBP: 00000000006dbc20 R08: 0000000000000001 R09: 0000000000000032
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c
R13: 00007f2a2bb33d80 R14: ffffffffffffffff R15: 0000000000000005
BUG: unable to handle kernel NULL pointer dereference at 0000000000000118
PGD 1cdc72067 P4D 1cdc72067 PUD 1cdeb4067 PMD 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 5498 Comm: syz-executor702 Not tainted 4.19.0-rc5+ #31
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:cpumask_set_cpu include/linux/cpumask.h:311 [inline]
RIP: 0010:blk_mq_map_swqueue+0x29c/0xa70 block/blk-mq.c:2336
Code: 80 3c 1a 00 0f 85 fa 06 00 00 44 89 ee bf 3f 00 00 00 4d 8b 24 24 e8 33 01 03 fe 41 83 fd 3f 0f 87 1c 05 00 00 e8 14 00 03 fe <f0> 4d 0f ab b4 24 18 01 00 00 49 8d bc 24 74 01 00 00 48 89 fa 48
RSP: 0018:ffff8801cedaf4e0 EFLAGS: 00010293
RAX: ffff8801c4f80400 RBX: dffffc0000000000 RCX: ffffffff837be3fd
RDX: 0000000000000000 RSI: ffffffff837be40c RDI: 0000000000000005
RBP: ffff8801cedaf550 R08: ffff8801c4f80400 R09: 0000000000000000
R10: ffffed003a31dff0 R11: ffff8801d18eff83 R12: 0000000000000000
R13: 0000000000000001 R14: 0000000000000001 R15: ffff8801d1fd7000
FS:  00007f2a2bb34700(0000) GS:ffff8801dac00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000118 CR3: 00000001c55c5000 CR4: 00000000001406f0
Call Trace:
 blk_mq_queue_reinit block/blk-mq.c:2675 [inline]
 __blk_mq_update_nr_hw_queues block/blk-mq.c:2994 [inline]
 blk_mq_update_nr_hw_queues+0xb2a/0xe50 block/blk-mq.c:3008
 nbd_start_device+0x1d2/0xcd0 drivers/block/nbd.c:1154
 nbd_start_device_ioctl drivers/block/nbd.c:1195 [inline]
 __nbd_ioctl drivers/block/nbd.c:1266 [inline]
 nbd_ioctl+0x6af/0xd40 drivers/block/nbd.c:1306
 __blkdev_driver_ioctl block/ioctl.c:303 [inline]
 blkdev_ioctl+0x9ac/0x2010 block/ioctl.c:601
 block_ioctl+0xee/0x130 fs/block_dev.c:1883
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0x1de/0x1720 fs/ioctl.c:685
 ksys_ioctl+0xa9/0xd0 fs/ioctl.c:702
 __do_sys_ioctl fs/ioctl.c:709 [inline]
 __se_sys_ioctl fs/ioctl.c:707 [inline]
 __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:707
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x44a429
Code: e8 ac b4 02 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 0b cd fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f2a2bb33d78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000006dbc28 RCX: 000000000044a429
RDX: 0000000000000002 RSI: 000000000000ab03 RDI: 0000000000000004
RBP: 00000000006dbc20 R08: 0000000000000001 R09: 0000000000000032
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dbc2c
R13: 00007f2a2bb33d80 R14: ffffffffffffffff R15: 0000000000000005
Modules linked in:
CR2: 0000000000000118
---[ end trace cca4d386a05f3868 ]---
RIP: 0010:cpumask_set_cpu include/linux/cpumask.h:311 [inline]
RIP: 0010:blk_mq_map_swqueue+0x29c/0xa70 block/blk-mq.c:2336
Code: 80 3c 1a 00 0f 85 fa 06 00 00 44 89 ee bf 3f 00 00 00 4d 8b 24 24 e8 33 01 03 fe 41 83 fd 3f 0f 87 1c 05 00 00 e8 14 00 03 fe <f0> 4d 0f ab b4 24 18 01 00 00 49 8d bc 24 74 01 00 00 48 89 fa 48
RSP: 0018:ffff8801cedaf4e0 EFLAGS: 00010293
RAX: ffff8801c4f80400 RBX: dffffc0000000000 RCX: ffffffff837be3fd
RDX: 0000000000000000 RSI: ffffffff837be40c RDI: 0000000000000005
RBP: ffff8801cedaf550 R08: ffff8801c4f80400 R09: 0000000000000000
R10: ffffed003a31dff0 R11: ffff8801d18eff83 R12: 0000000000000000
R13: 0000000000000001 R14: 0000000000000001 R15: ffff8801d1fd7000
FS:  00007f2a2bb34700(0000) GS:ffff8801dac00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000118 CR3: 00000001c55c5000 CR4: 00000000001406f0

Crashes (8):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-selinux-root 2018/09/25 05:45 upstream 02214bfc89c7 0e7547d7 .config log report syz C
ci-upstream-kasan-gce-smack-root 2018/10/16 21:28 upstream b955a910d7fd 1ba7fd7e .config log report
ci-upstream-kasan-gce-selinux-root 2018/10/07 03:46 upstream c1d84a1b42ef 8b311eaf .config log report
ci-upstream-kasan-gce-smack-root 2018/10/03 06:38 upstream 1d2ba7fee28b 0f3e0261 .config log report
ci-upstream-kasan-gce-root 2018/10/03 06:36 upstream 1d2ba7fee28b 0f3e0261 .config log report
ci-upstream-kasan-gce-selinux-root 2018/10/01 18:59 upstream 17b57b1883c1 48a50c6b .config log report
ci-upstream-kasan-gce-selinux-root 2018/09/30 20:57 upstream 17b57b1883c1 41e4b329 .config log report
ci-upstream-kasan-gce-selinux-root 2018/09/25 05:03 upstream 02214bfc89c7 0e7547d7 .config log report