syzbot


BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue

Status: fixed on 2019/12/16 09:09
Reported-by: syzbot+44b602388f5d930d84c2@syzkaller.appspotmail.com
Fix commit: 0b584bf573ae nbd: fix max number of supported devs
First crash: 2041d, last: 1803d
Fix bisection: fixed by (bisect log) :
commit 0b584bf573ae59021069c056c22d65d5721910cb
Author: Mike Christie <mchristi@redhat.com>
Date: Sun Aug 4 19:10:06 2019 +0000

  nbd: fix max number of supported devs

  
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: unable to handle kernel NULL pointer dereference in blk_mq_map_swqueue block C 8 2227d 2247d 11/28 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 20 739d 1803d 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 13 637d 1758d 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 1850d 2035d 1/1 fixed on 2019/12/14 05:59

Sample crash report:
RAX: ffffffffffffffda RBX: 00007ffe3bd3f210 RCX: 00000000004446b9
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000006
RBP: 0000000000000007 R08: 0000000000000001 R09: 0000000000400d80
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004023c0
R13: 0000000000402450 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+0x25e/0x9c0 block/blk-mq.c:2171
PGD a5472067 P4D a5472067 PUD a974b067 PMD 0 
Oops: 0002 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 0 PID: 6967 Comm: syz-executor877 Not tainted 4.14.113 #3
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8880a6f72480 task.stack: ffff88809d570000
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+0x25e/0x9c0 block/blk-mq.c:2171
RSP: 0018:ffff88809d577a50 EFLAGS: 00010297
RAX: ffff8880a6f72480 RBX: 0000000000000001 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffff8880a48b79c0 RDI: ffff8880a48b79c8
RBP: ffff88809d577ac8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: ffff88809d5778e8 R12: 0000000000000001
R13: ffff8882192e9300 R14: dffffc0000000000 R15: ffff8880a4ba0fb0
FS:  00000000018a1940(0000) GS:ffff8880aee00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000120 CR3: 00000000a55e9000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 blk_mq_queue_reinit block/blk-mq.c:2512 [inline]
 __blk_mq_update_nr_hw_queues block/blk-mq.c:2746 [inline]
 blk_mq_update_nr_hw_queues+0x21c/0x3a0 block/blk-mq.c:2756
 nbd_start_device+0x12c/0xb00 drivers/block/nbd.c:1144
 nbd_start_device_ioctl drivers/block/nbd.c:1185 [inline]
 __nbd_ioctl drivers/block/nbd.c:1256 [inline]
 nbd_ioctl+0x43e/0xae0 drivers/block/nbd.c:1296
 __blkdev_driver_ioctl block/ioctl.c:297 [inline]
 blkdev_ioctl+0x983/0x1880 block/ioctl.c:594
 block_ioctl+0xde/0x120 fs/block_dev.c:1881
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:500 [inline]
 do_vfs_ioctl+0x7b9/0x1070 fs/ioctl.c:684
 SYSC_ioctl fs/ioctl.c:701 [inline]
 SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
 do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4446b9
RSP: 002b:00007ffe3bd3f168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffe3bd3f210 RCX: 00000000004446b9
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000006
RBP: 0000000000000007 R08: 0000000000000001 R09: 0000000000400d80
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004023c0
R13: 0000000000402450 R14: 0000000000000000 R15: 0000000000000000
Code: ea 03 42 80 3c 32 00 0f 85 94 06 00 00 41 83 fc 3f 48 8b 17 0f 87 4b 04 00 00 48 89 55 c8 48 89 45 d0 e8 76 17 93 fe 48 8b 55 c8 <f0> 48 0f ab 9a 20 01 00 00 48 8d ba 78 01 00 00 48 8b 45 d0 48 
RIP: set_bit arch/x86/include/asm/bitops.h:81 [inline] RSP: ffff88809d577a50
RIP: cpumask_set_cpu include/linux/cpumask.h:283 [inline] RSP: ffff88809d577a50
RIP: blk_mq_map_swqueue+0x25e/0x9c0 block/blk-mq.c:2171 RSP: ffff88809d577a50
CR2: 0000000000000120
---[ end trace 48c34c2e429ec6a4 ]---

Crashes (20):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/04/21 08:39 linux-4.14.y 68d7a45eec10 b0e8efcb .config console log report syz C ci2-linux-4-14
2019/12/15 04:28 linux-4.14.y a844dc4c5442 eef6e580 .config console log report ci2-linux-4-14
2019/11/13 04:46 linux-4.14.y 4762bcd451a9 048f2d49 .config console log report ci2-linux-4-14
2019/10/11 12:58 linux-4.14.y 42327896f194 1a3bad90 .config console log report ci2-linux-4-14
2019/09/29 15:46 linux-4.14.y f6e27dbb1afa c1ad5441 .config console log report ci2-linux-4-14
2019/09/08 07:38 linux-4.14.y 414510bc00a5 a60cb4cd .config console log report ci2-linux-4-14
2019/08/31 18:26 linux-4.14.y 01fd1694b93c bad3cce2 .config console log report ci2-linux-4-14
2019/08/31 13:03 linux-4.14.y 01fd1694b93c bcd7bcc2 .config console log report ci2-linux-4-14
2019/08/12 14:03 linux-4.14.y 3ffe1e79c174 8620c2c2 .config console log report ci2-linux-4-14
2019/08/10 09:23 linux-4.14.y 3ffe1e79c174 acb51638 .config console log report ci2-linux-4-14
2019/08/08 18:24 linux-4.14.y b19ffe6e7205 bcc419e9 .config console log report ci2-linux-4-14
2019/07/27 06:49 linux-4.14.y ff33472c282e c85e1c5b .config console log report ci2-linux-4-14
2019/06/25 14:26 linux-4.14.y bc2bccef19ee 0a8d1a96 .config console log report ci2-linux-4-14
2019/06/21 01:07 linux-4.14.y bb263a2a2d43 34bf9440 .config console log report ci2-linux-4-14
2019/06/20 12:28 linux-4.14.y bb263a2a2d43 34bf9440 .config console log report ci2-linux-4-14
2019/06/16 09:12 linux-4.14.y a74d0e937a3a 442206d7 .config console log report ci2-linux-4-14
2019/05/03 01:25 linux-4.14.y 1c046f373132 e9039493 .config console log report ci2-linux-4-14
2019/05/02 05:31 linux-4.14.y fa5941f45d7e 7516d9fa .config console log report ci2-linux-4-14
2019/04/26 20:54 linux-4.14.y 68d7a45eec10 b617407b .config console log report ci2-linux-4-14
2019/04/21 08:18 linux-4.14.y 68d7a45eec10 b0e8efcb .config console log report ci2-linux-4-14
* Struck through repros no longer work on HEAD.