syzbot


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

Status: upstream: reported C repro on 2019/12/15 04:28
Reported-by: syzbot+16be244270556f0045fe@syzkaller.appspotmail.com
First crash: 1593d, last: 529d
Fix bisection: failed (error log, bisect log)
  
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 1593d 1831d 1/1 fixed on 2019/12/16 09:09
upstream BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue block C 8 2017d 2037d 11/26 fixed on 2018/11/12 21:25
linux-4.14 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue (2) C 13 426d 1548d 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 1640d 1825d 1/1 fixed on 2019/12/14 05:59
Fix bisection attempts (4)
Created Duration User Patch Repo Result
2020/06/20 19:47 0m bisect fix linux-4.19.y error job log (0)
2020/04/29 06:02 26m bisect fix linux-4.19.y job log (0) log
2020/02/13 05:25 24m bisect fix linux-4.19.y job log (0) log
2020/01/14 04:59 26m bisect fix linux-4.19.y job log (0) log

Sample crash report:
RAX: ffffffffffffffda RBX: 00007f037515e4c0 RCX: 00007f03750e1089
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000007
RBP: 00007f037512b3bc R08: 0000000000000002 R09: 0000000000003932
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f037515e4cc
R13: 00007f03750862f0 R14: 00007f037515e4c8 R15: 0000000000000002
BUG: unable to handle kernel NULL pointer dereference at 0000000000000118
PGD aa872067 P4D aa872067 PUD b527d067 PMD 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 10725 Comm: syz-executor386 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
RIP: 0010:set_bit arch/x86/include/asm/bitops.h:76 [inline]
RIP: 0010:cpumask_set_cpu include/linux/cpumask.h:311 [inline]
RIP: 0010:blk_mq_map_swqueue+0x287/0xa20 block/blk-mq.c:2355
Code: c1 ea 03 80 3c 1a 00 0f 85 cf 06 00 00 89 ee bf 07 00 00 00 4d 8b 3f e8 47 04 fd fd 83 fd 07 0f 87 04 05 00 00 e8 c9 02 fd fd <f0> 4d 0f ab b7 18 01 00 00 49 8d bf 74 01 00 00 48 89 fa 48 c1 ea
RSP: 0018:ffff8880b3537920 EFLAGS: 00010293
RAX: ffff888096e6a100 RBX: dffffc0000000000 RCX: ffffffff83658299
RDX: 0000000000000000 RSI: ffffffff836582a7 RDI: 0000000000000005
RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000007
R10: 0000000000000005 R11: 0000000000000000 R12: ffff8880ae4fc040
R13: ffffe8ffffd3a6c0 R14: 0000000000000001 R15: 0000000000000000
FS:  00007f0375086700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000118 CR3: 00000000a9920000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 blk_mq_queue_reinit block/blk-mq.c:2697 [inline]
 __blk_mq_update_nr_hw_queues block/blk-mq.c:3018 [inline]
 blk_mq_update_nr_hw_queues+0x5bb/0xb50 block/blk-mq.c:3032
 nbd_start_device+0x1f2/0xd60 drivers/block/nbd.c:1214
 nbd_start_device_ioctl drivers/block/nbd.c:1265 [inline]
 __nbd_ioctl drivers/block/nbd.c:1347 [inline]
 nbd_ioctl+0x62c/0xbe0 drivers/block/nbd.c:1387
 __blkdev_driver_ioctl block/ioctl.c:303 [inline]
 blkdev_ioctl+0x5cb/0x1a80 block/ioctl.c:601
 block_ioctl+0xe9/0x130 fs/block_dev.c:1906
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688
 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705
 __do_sys_ioctl fs/ioctl.c:712 [inline]
 __se_sys_ioctl fs/ioctl.c:710 [inline]
 __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f03750e1089
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 01 18 00 00 90 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f03750862e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f037515e4c0 RCX: 00007f03750e1089
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000007
RBP: 00007f037512b3bc R08: 0000000000000002 R09: 0000000000003932
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f037515e4cc
R13: 00007f03750862f0 R14: 00007f037515e4c8 R15: 0000000000000002
Modules linked in:
CR2: 0000000000000118
---[ end trace 64bc7ae3f1c76c37 ]---
RIP: 0010:set_bit arch/x86/include/asm/bitops.h:76 [inline]
RIP: 0010:cpumask_set_cpu include/linux/cpumask.h:311 [inline]
RIP: 0010:blk_mq_map_swqueue+0x287/0xa20 block/blk-mq.c:2355
Code: c1 ea 03 80 3c 1a 00 0f 85 cf 06 00 00 89 ee bf 07 00 00 00 4d 8b 3f e8 47 04 fd fd 83 fd 07 0f 87 04 05 00 00 e8 c9 02 fd fd <f0> 4d 0f ab b7 18 01 00 00 49 8d bf 74 01 00 00 48 89 fa 48 c1 ea
RSP: 0018:ffff8880b3537920 EFLAGS: 00010293
RAX: ffff888096e6a100 RBX: dffffc0000000000 RCX: ffffffff83658299
RDX: 0000000000000000 RSI: ffffffff836582a7 RDI: 0000000000000005
RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000007
R10: 0000000000000005 R11: 0000000000000000 R12: ffff8880ae4fc040
R13: ffffe8ffffd3a6c0 R14: 0000000000000001 R15: 0000000000000000
FS:  00007f0375086700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000118 CR3: 00000000a9920000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	c1 ea 03             	shr    $0x3,%edx
   3:	80 3c 1a 00          	cmpb   $0x0,(%rdx,%rbx,1)
   7:	0f 85 cf 06 00 00    	jne    0x6dc
   d:	89 ee                	mov    %ebp,%esi
   f:	bf 07 00 00 00       	mov    $0x7,%edi
  14:	4d 8b 3f             	mov    (%r15),%r15
  17:	e8 47 04 fd fd       	callq  0xfdfd0463
  1c:	83 fd 07             	cmp    $0x7,%ebp
  1f:	0f 87 04 05 00 00    	ja     0x529
  25:	e8 c9 02 fd fd       	callq  0xfdfd02f3
* 2a:	f0 4d 0f ab b7 18 01 	lock bts %r14,0x118(%r15) <-- trapping instruction
  31:	00 00
  33:	49 8d bf 74 01 00 00 	lea    0x174(%r15),%rdi
  3a:	48 89 fa             	mov    %rdi,%rdx
  3d:	48                   	rex.W
  3e:	c1                   	.byte 0xc1
  3f:	ea                   	(bad)

Crashes (20):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/10/09 03:41 linux-4.19.y 3f8a27f9e27b aea5da89 .config console log report syz C [disk image] [vmlinux] ci2-linux-4-19 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue
2022/06/28 11:10 linux-4.19.y 3f8a27f9e27b ef82eb2c .config console log report syz C ci2-linux-4-19 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue
2022/06/05 01:00 linux-4.19.y 3f8a27f9e27b c8857892 .config console log report syz C ci2-linux-4-19 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue
2022/02/09 07:18 linux-4.19.y 3f8a27f9e27b 0b33604d .config console log report syz C ci2-linux-4-19 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue
2022/02/07 01:20 linux-4.19.y 3f8a27f9e27b a7dab638 .config console log report syz C ci2-linux-4-19 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue
2019/12/15 04:49 linux-4.19.y 312017a460d5 eef6e580 .config console log report syz C ci2-linux-4-19
2022/11/12 21:30 linux-4.19.y 3f8a27f9e27b f42ee5d8 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue
2022/11/03 01:45 linux-4.19.y 3f8a27f9e27b 08977f5d .config console log report info [disk image] [vmlinux] ci2-linux-4-19 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue
2022/09/21 19:40 linux-4.19.y 3f8a27f9e27b 380f82fb .config console log report info [disk image] [vmlinux] ci2-linux-4-19 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue
2021/09/06 21:15 linux-4.19.y b172b44fcb17 6ca60148 .config console log report info ci2-linux-4-19 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue
2021/06/02 00:26 linux-4.19.y 6b7b0056defc 032639db .config console log report info ci2-linux-4-19 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue
2021/03/21 01:08 linux-4.19.y 125222814e7b 17810eae .config console log report info ci2-linux-4-19 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue
2021/01/21 00:09 linux-4.19.y 43d555d83c3f d4f4eca5 .config console log report info ci2-linux-4-19 BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue
2020/12/11 20:28 linux-4.19.y 13d2ce42de8c ba24ffcd .config console log report info ci2-linux-4-19
2020/08/12 22:27 linux-4.19.y c14d30dc9987 0d7bd2e0 .config console log report ci2-linux-4-19
2020/05/21 19:05 linux-4.19.y 1bab61d3e8cd 4afdfa20 .config console log report ci2-linux-4-19
2020/03/30 06:02 linux-4.19.y 54b4fa6d3955 05736b29 .config console log report ci2-linux-4-19
2020/03/10 02:55 linux-4.19.y 7472c4028e23 35f53e45 .config console log report ci2-linux-4-19
2020/02/22 09:30 linux-4.19.y 4fccc2503536 2ffa6679 .config console log report ci2-linux-4-19
2019/12/15 04:27 linux-4.19.y 312017a460d5 eef6e580 .config console log report ci2-linux-4-19
* Struck through repros no longer work on HEAD.