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

13 views
Skip to first unread message

syzbot

unread,
Dec 14, 2019, 11:28:08 PM12/14/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 312017a4 Linux 4.19.89
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17bba20ae00000
kernel config: https://syzkaller.appspot.com/x/.config?x=67c148d572dbab48
dashboard link: https://syzkaller.appspot.com/bug?extid=16be244270556f0045fe
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+16be24...@syzkaller.appspotmail.com

R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8f8c5036d4
R13: 00000000004c4670 R14: 00000000004d9da0 R15: 0000000000000007
block nbd1: shutting down sockets
block nbd4: shutting down sockets
block nbd3: shutting down sockets
BUG: unable to handle kernel NULL pointer dereference at 0000000000000118
kobject: 'loop1' (00000000276f4f68): kobject_uevent_env
PGD 8cb59067 P4D 8cb59067 PUD a305a067 PMD 0
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 12434 Comm: syz-executor.5 Not tainted 4.19.89-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
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+0x29e/0xa60 block/blk-mq.c:2344
Code: 80 3c 18 00 0f 85 e9 06 00 00 44 89 e6 bf 3f 00 00 00 4d 8b 6d 00 e8
c1 0b 1a fe 41 83 fc 3f 0f 87 17 05 00 00 e8 32 0a 1a fe <f0> 4d 0f ab b5
18 01 00 00 49 8d bd 74 01 00 00 48 89 fa 48 c1 ea
RSP: 0018:ffff88805330f8b8 EFLAGS: 00010246
RAX: 0000000000040000 RBX: dffffc0000000000 RCX: ffffc9001090b000
RDX: 0000000000040000 RSI: ffffffff8351392e RDI: 0000000000000005
RBP: ffff88805330f928 R08: ffff88805412c080 R09: 0000000000000000
R10: ffffed1009953ff0 R11: ffff88804ca9ff83 R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000001 R15: ffff8880a3ea30c0
FS: 00007f8f8c503700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000118 CR3: 000000008df9c000 CR4: 00000000001406e0
block nbd3: shutting down sockets
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
blk_mq_queue_reinit block/blk-mq.c:2686 [inline]
__blk_mq_update_nr_hw_queues block/blk-mq.c:3007 [inline]
blk_mq_update_nr_hw_queues+0x5ab/0xb70 block/blk-mq.c:3021
kobject: 'loop1' (00000000276f4f68): fill_kobj_path: path
= '/devices/virtual/block/loop1'
nbd_start_device+0x1f7/0xd00 drivers/block/nbd.c:1200
nbd_start_device_ioctl drivers/block/nbd.c:1241 [inline]
__nbd_ioctl drivers/block/nbd.c:1323 [inline]
nbd_ioctl+0x412/0xcb0 drivers/block/nbd.c:1363
kobject: 'loop4' (00000000998316b3): kobject_uevent_env
kobject: 'loop4' (00000000998316b3): fill_kobj_path: path
= '/devices/virtual/block/loop4'
__blkdev_driver_ioctl block/ioctl.c:303 [inline]
blkdev_ioctl+0xc38/0x1ab6 block/ioctl.c:601
block_ioctl+0xee/0x130 fs/block_dev.c:1891
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:688
ksys_ioctl+0xab/0xd0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:710
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x45a909
Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f8f8c502c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f8f8c502c90 RCX: 000000000045a909
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000003
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8f8c5036d4
R13: 00000000004c4670 R14: 00000000004d9da0 R15: 0000000000000007
Modules linked in:
CR2: 0000000000000118
kobject: 'loop3' (000000005d998df9): kobject_uevent_env
kobject: 'loop3' (000000005d998df9): fill_kobj_path: path
= '/devices/virtual/block/loop3'
block nbd4: shutting down sockets
kobject: 'loop0' (0000000042386364): kobject_uevent_env
block nbd4: shutting down sockets
kobject: 'loop0' (0000000042386364): fill_kobj_path: path
= '/devices/virtual/block/loop0'
---[ end trace caed823574dbc4fa ]---
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+0x29e/0xa60 block/blk-mq.c:2344
Code: 80 3c 18 00 0f 85 e9 06 00 00 44 89 e6 bf 3f 00 00 00 4d 8b 6d 00 e8
c1 0b 1a fe 41 83 fc 3f 0f 87 17 05 00 00 e8 32 0a 1a fe <f0> 4d 0f ab b5
18 01 00 00 49 8d bd 74 01 00 00 48 89 fa 48 c1 ea
kobject: 'loop4' (00000000998316b3): kobject_uevent_env
RSP: 0018:ffff88805330f8b8 EFLAGS: 00010246
kobject: 'loop4' (00000000998316b3): fill_kobj_path: path
= '/devices/virtual/block/loop4'
RAX: 0000000000040000 RBX: dffffc0000000000 RCX: ffffc9001090b000
kobject: 'loop2' (000000003ead0ad9): kobject_uevent_env
RDX: 0000000000040000 RSI: ffffffff8351392e RDI: 0000000000000005
kobject: 'loop2' (000000003ead0ad9): fill_kobj_path: path
= '/devices/virtual/block/loop2'
RBP: ffff88805330f928 R08: ffff88805412c080 R09: 0000000000000000
kobject: 'loop1' (00000000276f4f68): kobject_uevent_env
R10: ffffed1009953ff0 R11: ffff88804ca9ff83 R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000001 R15: ffff8880a3ea30c0
kobject: 'loop1' (00000000276f4f68): fill_kobj_path: path
= '/devices/virtual/block/loop1'
FS: 00007f8f8c503700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000625208 CR3: 000000008df9c000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
This bug 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 bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Dec 14, 2019, 11:50:09 PM12/14/19
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following crash on:

HEAD commit: 312017a4 Linux 4.19.89
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15f0fcb6e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=67c148d572dbab48
dashboard link: https://syzkaller.appspot.com/bug?extid=16be244270556f0045fe
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17c9503ae00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=144b0056e00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+16be24...@syzkaller.appspotmail.com

RAX: ffffffffffffffda RBX: 00007ffe340053a0 RCX: 0000000000445379
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000003
RBP: 0000000000000007 R08: 0000000000000002 R09: 0000000001003031
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004026e0
R13: 0000000000402770 R14: 0000000000000000 R15: 0000000000000000
BUG: unable to handle kernel NULL pointer dereference at 0000000000000118
PGD 95387067 P4D 95387067 PUD 94351067 PMD 0
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 7708 Comm: syz-executor305 Not tainted 4.19.89-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
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+0x29e/0xa60 block/blk-mq.c:2344
Code: 80 3c 18 00 0f 85 e9 06 00 00 44 89 e6 bf 3f 00 00 00 4d 8b 6d 00 e8
c1 0b 1a fe 41 83 fc 3f 0f 87 17 05 00 00 e8 32 0a 1a fe <f0> 4d 0f ab b5
18 01 00 00 49 8d bd 74 01 00 00 48 89 fa 48 c1 ea
RSP: 0018:ffff88808fb1f8b8 EFLAGS: 00010293
RAX: ffff888096e340c0 RBX: dffffc0000000000 RCX: ffffffff8351391f
RDX: 0000000000000000 RSI: ffffffff8351392e RDI: 0000000000000005
RBP: ffff88808fb1f928 R08: ffff888096e340c0 R09: 0000000000000000
R10: ffffed1012573ff0 R11: ffff888092b9ff83 R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000001 R15: ffff8880a3cc50c0
FS: 0000000001902940(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000118 CR3: 000000009b0f5000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
blk_mq_queue_reinit block/blk-mq.c:2686 [inline]
__blk_mq_update_nr_hw_queues block/blk-mq.c:3007 [inline]
blk_mq_update_nr_hw_queues+0x5ab/0xb70 block/blk-mq.c:3021
nbd_start_device+0x1f7/0xd00 drivers/block/nbd.c:1200
nbd_start_device_ioctl drivers/block/nbd.c:1241 [inline]
__nbd_ioctl drivers/block/nbd.c:1323 [inline]
nbd_ioctl+0x412/0xcb0 drivers/block/nbd.c:1363
__blkdev_driver_ioctl block/ioctl.c:303 [inline]
blkdev_ioctl+0xc38/0x1ab6 block/ioctl.c:601
block_ioctl+0xee/0x130 fs/block_dev.c:1891
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:501 [inline]
do_vfs_ioctl+0xd5f/0x1380 fs/ioctl.c:688
ksys_ioctl+0xab/0xd0 fs/ioctl.c:705
__do_sys_ioctl fs/ioctl.c:712 [inline]
__se_sys_ioctl fs/ioctl.c:710 [inline]
__x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:710
do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x445379
Code: e8 cc ac 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 db ce fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffe34005398 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffe340053a0 RCX: 0000000000445379
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000003
RBP: 0000000000000007 R08: 0000000000000002 R09: 0000000001003031
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004026e0
R13: 0000000000402770 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
CR2: 0000000000000118
---[ end trace 42f62637b7a3b2e6 ]---
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+0x29e/0xa60 block/blk-mq.c:2344
Code: 80 3c 18 00 0f 85 e9 06 00 00 44 89 e6 bf 3f 00 00 00 4d 8b 6d 00 e8
c1 0b 1a fe 41 83 fc 3f 0f 87 17 05 00 00 e8 32 0a 1a fe <f0> 4d 0f ab b5
18 01 00 00 49 8d bd 74 01 00 00 48 89 fa 48 c1 ea
RSP: 0018:ffff88808fb1f8b8 EFLAGS: 00010293
RAX: ffff888096e340c0 RBX: dffffc0000000000 RCX: ffffffff8351391f
RDX: 0000000000000000 RSI: ffffffff8351392e RDI: 0000000000000005
RBP: ffff88808fb1f928 R08: ffff888096e340c0 R09: 0000000000000000
R10: ffffed1012573ff0 R11: ffff888092b9ff83 R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000001 R15: ffff8880a3cc50c0
FS: 0000000001902940(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000118 CR3: 000000009b0f5000 CR4: 00000000001406f0
Reply all
Reply to author
Forward
0 new messages