syzbot


BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue (2)

Status: upstream: reported C repro on 2020/01/29 04:42
Reported-by: syzbot+a1d2892b0b96e832a410@syzkaller.appspotmail.com
First crash: 881d, last: 1h30m
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 926d 1164d 1/1 fixed on 2019/12/16 09:09
upstream BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue C 8 1350d 1370d 12/22 fixed on 2018/11/12 21:25
linux-4.19 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue (2) C error 16 29m 926d 0/1 upstream: reported C repro on 2019/12/15 04:28
linux-4.19 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue C done 12 973d 1158d 1/1 fixed on 2019/12/14 05:59

Sample crash report:
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007eff30d38dd9
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000007
RBP: 00007ffe8409d460 R08: 0000000000000002 R09: 00007eff30003431
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000008
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
BUG: unable to handle kernel NULL pointer dereference at 0000000000000120
IP: set_bit arch/x86/include/asm/bitops.h:81 [inline]
IP: cpumask_set_cpu include/linux/cpumask.h:283 [inline]
IP: blk_mq_map_swqueue+0x253/0x990 block/blk-mq.c:2171
PGD a9c95067 P4D a9c95067 PUD a9f35067 PMD 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 1 PID: 7968 Comm: syz-executor246 Not tainted 4.14.285-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff88809a1f0340 task.stack: ffff8880915a0000
RIP: 0010:set_bit arch/x86/include/asm/bitops.h:81 [inline]
RIP: 0010:cpumask_set_cpu include/linux/cpumask.h:283 [inline]
RIP: 0010:blk_mq_map_swqueue+0x253/0x990 block/blk-mq.c:2171
RSP: 0018:ffff8880915a7a80 EFLAGS: 00010297
RAX: ffff88809a1f0340 RBX: ffff8880ae99b0b0 RCX: 1ffff11015d1bfd1
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff88cc7d68
RBP: 0000000000000001 R08: ffff8880ae8dfe80 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001
R13: ffff8882386b0280 R14: 0000000000000000 R15: dffffc0000000000
FS:  0000555556b04300(0000) GS:ffff8880ba500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000120 CR3: 00000000a56b1000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 blk_mq_queue_reinit block/blk-mq.c:2514 [inline]
 __blk_mq_update_nr_hw_queues block/blk-mq.c:2752 [inline]
 blk_mq_update_nr_hw_queues+0x246/0x3e0 block/blk-mq.c:2762
 nbd_start_device+0x1d7/0xca0 drivers/block/nbd.c:1201
 nbd_start_device_ioctl drivers/block/nbd.c:1252 [inline]
 __nbd_ioctl drivers/block/nbd.c:1334 [inline]
 nbd_ioctl+0x3c4/0xac0 drivers/block/nbd.c:1374
 __blkdev_driver_ioctl block/ioctl.c:297 [inline]
 blkdev_ioctl+0x540/0x1830 block/ioctl.c:594
 block_ioctl+0xd9/0x120 fs/block_dev.c:1893
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:500 [inline]
 do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7eff30d38dd9
RSP: 002b:00007ffe8409d458 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007eff30d38dd9
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000007
RBP: 00007ffe8409d460 R08: 0000000000000002 R09: 00007eff30003431
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000008
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Code: 4d 8d 34 c8 4c 89 f1 48 c1 e9 03 42 80 3c 39 00 0f 85 37 05 00 00 83 fd 07 4d 8b 36 0f 87 42 04 00 00 48 89 04 24 e8 6d 3d 4a fe <f0> 4d 0f ab a6 20 01 00 00 49 8d be 78 01 00 00 48 8b 04 24 48 
RIP: set_bit arch/x86/include/asm/bitops.h:81 [inline] RSP: ffff8880915a7a80
RIP: cpumask_set_cpu include/linux/cpumask.h:283 [inline] RSP: ffff8880915a7a80
RIP: blk_mq_map_swqueue+0x253/0x990 block/blk-mq.c:2171 RSP: ffff8880915a7a80
CR2: 0000000000000120
---[ end trace 076375593567f551 ]---
----------------
Code disassembly (best guess):
   0:	4d 8d 34 c8          	lea    (%r8,%rcx,8),%r14
   4:	4c 89 f1             	mov    %r14,%rcx
   7:	48 c1 e9 03          	shr    $0x3,%rcx
   b:	42 80 3c 39 00       	cmpb   $0x0,(%rcx,%r15,1)
  10:	0f 85 37 05 00 00    	jne    0x54d
  16:	83 fd 07             	cmp    $0x7,%ebp
  19:	4d 8b 36             	mov    (%r14),%r14
  1c:	0f 87 42 04 00 00    	ja     0x464
  22:	48 89 04 24          	mov    %rax,(%rsp)
  26:	e8 6d 3d 4a fe       	callq  0xfe4a3d98
* 2b:	f0 4d 0f ab a6 20 01 	lock bts %r12,0x120(%r14) <-- trapping instruction
  32:	00 00
  34:	49 8d be 78 01 00 00 	lea    0x178(%r14),%rdi
  3b:	48 8b 04 24          	mov    (%rsp),%rax
  3f:	48                   	rex.W

Fix bisection attempts:
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2022/05/19 08:48 linux-4.14.y dffb5c6ff09c 3cd800e4 .config log report syz C
ci2-linux-4-14 2022/04/19 08:06 linux-4.14.y 74766a973637 3cd800e4 .config log report syz C
ci2-linux-4-14 2022/03/20 04:27 linux-4.14.y eb045674aab3 3cd800e4 .config log report syz C
ci2-linux-4-14 2022/01/26 19:11 linux-4.14.y 4ba8e26127c3 c8e81ce4 .config log report syz C
ci2-linux-4-14 2021/12/27 18:28 linux-4.14.y 8ee0807eedf3 c8e81ce4 .config log report syz C
ci2-linux-4-14 2021/11/27 17:57 linux-4.14.y 66722c42ec91 c8e81ce4 .config log report syz C
ci2-linux-4-14 2021/10/28 17:31 linux-4.14.y cd5296934610 c8e81ce4 .config log report syz C
ci2-linux-4-14 2021/09/24 18:45 linux-4.14.y 8ea4f73cfa7e c8e81ce4 .config log report syz C
ci2-linux-4-14 2021/08/25 18:16 linux-4.14.y 162b95d01320 c8e81ce4 .config log report syz C
ci2-linux-4-14 2021/07/26 17:28 linux-4.14.y 964f3712e6a7 c8e81ce4 .config log report syz C
ci2-linux-4-14 2021/06/26 16:58 linux-4.14.y cfb41ef9deb1 c8e81ce4 .config log report syz C
ci2-linux-4-14 2021/05/27 16:27 linux-4.14.y ad8397a84e1e c8e81ce4 .config log report syz C
ci2-linux-4-14 2021/04/27 15:26 linux-4.14.y cf256fbcbe34 c8e81ce4 .config log report syz C
ci2-linux-4-14 2021/03/28 14:58 linux-4.14.y 670d6552eda8 c8e81ce4 .config log report syz C
ci2-linux-4-14 2021/02/26 14:35 linux-4.14.y 3242aa3a635c c8e81ce4 .config log report syz C
ci2-linux-4-14 2021/01/27 14:12 linux-4.14.y 2d2791fce891 c8e81ce4 .config log report syz C
ci2-linux-4-14 2020/12/28 13:45 linux-4.14.y 3f2ecb86cb90 c8e81ce4 .config log report syz C
ci2-linux-4-14 2020/11/28 13:20 linux-4.14.y 87335852c5d9 c8e81ce4 .config log report syz C
ci2-linux-4-14 2020/10/23 06:59 linux-4.14.y 5b7a52cd2eef c8e81ce4 .config log report syz C
ci2-linux-4-14 2020/09/23 06:35 linux-4.14.y cbfa1702aaf6 c8e81ce4 .config log report syz C
ci2-linux-4-14 2020/08/24 06:11 linux-4.14.y 6a24ca2506d6 c8e81ce4 .config log report syz C
ci2-linux-4-14 2020/07/25 05:44 linux-4.14.y 69b94dd6dcd1 c8e81ce4 .config log report syz C
ci2-linux-4-14 2020/05/27 13:53 linux-4.14.y a41ba30d9df2 c8e81ce4 .config log report syz C
ci2-linux-4-14 2020/04/27 13:29 linux-4.14.y 050272a0423e c8e81ce4 .config log report syz C
ci2-linux-4-14 2020/02/28 11:07 linux-4.14.y 98db2bf27b9e c8e81ce4 .config log report syz C
Crashes (12):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2022/06/28 10:09 linux-4.14.y f051383ef03b ef82eb2c .config log report syz C BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue
ci2-linux-4-14 2022/06/04 23:26 linux-4.14.y 501eec4f9e13 c8857892 .config log report syz C BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue
ci2-linux-4-14 2022/02/18 04:05 linux-4.14.y a35d65bedfbc 3cd800e4 .config log report syz C BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue
ci2-linux-4-14 2022/02/15 15:12 linux-4.14.y 8034e99d1a01 8b9ca619 .config log report syz C BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue
ci2-linux-4-14 2020/01/29 05:05 linux-4.14.y 9a95f25269bd c8e81ce4 .config log report syz C
ci2-linux-4-14 2020/10/29 12:16 linux-4.14.y 2b7915014161 f24824d3 .config log report info
ci2-linux-4-14 2020/10/25 12:33 linux-4.14.y 5b7a52cd2eef a1839e81 .config log report info
ci2-linux-4-14 2020/06/25 05:19 linux-4.14.y b850307b279c 9d60b18e .config log report
ci2-linux-4-14 2020/03/28 09:56 linux-4.14.y 01364dad1d45 831e9a81 .config log report
ci2-linux-4-14 2020/03/10 03:05 linux-4.14.y 78d697fc93f9 35f53e45 .config log report
ci2-linux-4-14 2020/02/29 14:36 linux-4.14.y 78d697fc93f9 c88c7b75 .config log report
ci2-linux-4-14 2020/01/29 04:41 linux-4.14.y 9a95f25269bd c8e81ce4 .config log report