public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [syzbot] general protection fault in blk_mq_free_rqs
@ 2022-02-10 19:17 syzbot
  0 siblings, 0 replies; 2+ messages in thread
From: syzbot @ 2022-02-10 19:17 UTC (permalink / raw)
  To: axboe, linux-block, linux-kernel, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    90c9e950c0de Merge tag 'for-linus-5.17a-rc3-tag' of git://..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=137905dc700000
kernel config:  https://syzkaller.appspot.com/x/.config?x=ee3797346aa03884
dashboard link: https://syzkaller.appspot.com/bug?extid=7295389ef2000630244b
compiler:       gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=10801462700000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=135d7524700000

Bisection is inconclusive: the issue happens on the oldest tested release.

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=14b09d42700000
final oops:     https://syzkaller.appspot.com/x/report.txt?x=16b09d42700000
console output: https://syzkaller.appspot.com/x/log.txt?x=12b09d42700000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+7295389ef2000630244b@syzkaller.appspotmail.com

general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 PID: 3605 Comm: syz-executor139 Not tainted 5.17.0-rc2-syzkaller-00353-g90c9e950c0de #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:blk_mq_clear_rq_mapping block/blk-mq.c:3061 [inline]
RIP: 0010:blk_mq_free_rqs+0x399/0x910 block/blk-mq.c:3106
Code: de e8 8b 83 ac fd 83 fb 3f 0f 87 04 c3 49 05 e8 5d 81 ac fd b8 00 10 00 00 89 d9 48 d3 e0 4c 01 e8 48 89 44 24 08 48 8b 04 24 <0f> b6 00 84 c0 74 08 3c 03 0f 8e bb 03 00 00 41 8b 1f 31 ff 31 ed
RSP: 0018:ffffc900027afaf8 EFLAGS: 00010286
RAX: dffffc0000000000 RBX: 0000000000000004 RCX: 0000000000000004
RDX: ffff888074ef3a00 RSI: ffffffff83cbf733 RDI: 0000000000000003
RBP: ffff888071ce6000 R08: 000000000000003f R09: ffffffff8ffbf99f
R10: ffffffff83cbf725 R11: 0000000000000246 R12: dffffc0000000000
R13: ffff88801a380000 R14: ffff88801a23f000 R15: 0000000000000000
FS:  00007f894cb64700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f894cc20aa3 CR3: 0000000021f45000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 blk_mq_sched_free_rqs block/blk-mq-sched.c:629 [inline]
 blk_mq_sched_free_rqs+0x16c/0x270 block/blk-mq-sched.c:618
 elevator_switch_mq+0xed/0x720 block/elevator.c:600
 blk_mq_elv_switch_none block/blk-mq.c:4445 [inline]
 __blk_mq_update_nr_hw_queues block/blk-mq.c:4498 [inline]
 blk_mq_update_nr_hw_queues+0x3f1/0xd30 block/blk-mq.c:4548
 nbd_start_device+0x157/0xd10 drivers/block/nbd.c:1347
 nbd_start_device_ioctl drivers/block/nbd.c:1397 [inline]
 __nbd_ioctl drivers/block/nbd.c:1471 [inline]
 nbd_ioctl+0x5f3/0xb10 drivers/block/nbd.c:1511
 blkdev_ioctl+0x37a/0x800 block/ioctl.c:588
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl fs/ioctl.c:860 [inline]
 __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f894cbb7349
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 11 15 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:00007f894cb642e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f894cc3c4e0 RCX: 00007f894cbb7349
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000007
RBP: 00007f894cc091ac R08: 0000000000000002 R09: 0000000000003331
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f894cc3c4ec
R13: 00007f894cb642f0 R14: 00007f894cc3c4e8 R15: 0000000000000002
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:blk_mq_clear_rq_mapping block/blk-mq.c:3061 [inline]
RIP: 0010:blk_mq_free_rqs+0x399/0x910 block/blk-mq.c:3106
Code: de e8 8b 83 ac fd 83 fb 3f 0f 87 04 c3 49 05 e8 5d 81 ac fd b8 00 10 00 00 89 d9 48 d3 e0 4c 01 e8 48 89 44 24 08 48 8b 04 24 <0f> b6 00 84 c0 74 08 3c 03 0f 8e bb 03 00 00 41 8b 1f 31 ff 31 ed
RSP: 0018:ffffc900027afaf8 EFLAGS: 00010286
RAX: dffffc0000000000 RBX: 0000000000000004 RCX: 0000000000000004
RDX: ffff888074ef3a00 RSI: ffffffff83cbf733 RDI: 0000000000000003
RBP: ffff888071ce6000 R08: 000000000000003f R09: ffffffff8ffbf99f
R10: ffffffff83cbf725 R11: 0000000000000246 R12: dffffc0000000000
R13: ffff88801a380000 R14: ffff88801a23f000 R15: 0000000000000000
FS:  00007f894cb64700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f894cc20aa3 CR3: 0000000021f45000 CR4: 0000000000350ef0
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	e8 8b 83 ac fd       	callq  0xfdac8390
   5:	83 fb 3f             	cmp    $0x3f,%ebx
   8:	0f 87 04 c3 49 05    	ja     0x549c312
   e:	e8 5d 81 ac fd       	callq  0xfdac8170
  13:	b8 00 10 00 00       	mov    $0x1000,%eax
  18:	89 d9                	mov    %ebx,%ecx
  1a:	48 d3 e0             	shl    %cl,%rax
  1d:	4c 01 e8             	add    %r13,%rax
  20:	48 89 44 24 08       	mov    %rax,0x8(%rsp)
  25:	48 8b 04 24          	mov    (%rsp),%rax
* 29:	0f b6 00             	movzbl (%rax),%eax <-- trapping instruction
  2c:	84 c0                	test   %al,%al
  2e:	74 08                	je     0x38
  30:	3c 03                	cmp    $0x3,%al
  32:	0f 8e bb 03 00 00    	jle    0x3f3
  38:	41 8b 1f             	mov    (%r15),%ebx
  3b:	31 ff                	xor    %edi,%edi
  3d:	31 ed                	xor    %ebp,%ebp


---
This report 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 syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [syzbot] general protection fault in blk_mq_free_rqs
       [not found] <GV1PR10MB6563B11E4E004F66BD31E37DE8AEA@GV1PR10MB6563.EURPRD10.PROD.OUTLOOK.COM>
@ 2023-11-10 19:20 ` syzbot
  0 siblings, 0 replies; 2+ messages in thread
From: syzbot @ 2023-11-10 19:20 UTC (permalink / raw)
  To: linux-kernel, syzkaller-bugs, yuran.pereira

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
WARNING in kernfs_remove_by_name_ns

------------[ cut here ]------------
kernfs: can not remove 'nr_tags', no directory
WARNING: CPU: 0 PID: 5711 at fs/kernfs/dir.c:1662 kernfs_remove_by_name_ns+0x102/0x120 fs/kernfs/dir.c:1662
Modules linked in:
CPU: 0 PID: 5711 Comm: syz-executor.0 Not tainted 6.6.0-syzkaller-15957-g826c484166f0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
RIP: 0010:kernfs_remove_by_name_ns+0x102/0x120 fs/kernfs/dir.c:1662
Code: 05 54 ff e8 d0 bc 74 ff bb fe ff ff ff 89 d8 5b 5d 41 5c 41 5d c3 e8 bd bc 74 ff 4c 89 e6 48 c7 c7 a0 b0 20 8a e8 9e 1f 3b ff <0f> 0b eb d5 e8 05 1e c8 ff e9 60 ff ff ff e8 fb 1d c8 ff e9 27 ff
RSP: 0018:ffffc90003577a48 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff8149ce16
RDX: ffff888019661dc0 RSI: ffffffff8149ce23 RDI: 0000000000000001
RBP: ffffffff8cd13840 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: ffffffff8a6a1200
R13: 0000000000000000 R14: ffffffff8a6a1120 R15: 0000000000000002
FS:  00007ff8f2c4e6c0(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff8f1b9d0b0 CR3: 0000000074800000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 kernfs_remove_by_name include/linux/kernfs.h:623 [inline]
 remove_files+0x96/0x1c0 fs/sysfs/group.c:28
 sysfs_remove_group+0x87/0x170 fs/sysfs/group.c:292
 sysfs_remove_groups fs/sysfs/group.c:316 [inline]
 sysfs_remove_groups+0x5c/0xa0 fs/sysfs/group.c:308
 __kobject_del+0x83/0x1e0 lib/kobject.c:592
 kobject_del lib/kobject.c:624 [inline]
 kobject_del+0x3b/0x60 lib/kobject.c:616
 blk_mq_unregister_hctx block/blk-mq-sysfs.c:155 [inline]
 blk_mq_unregister_hctx block/blk-mq-sysfs.c:144 [inline]
 blk_mq_sysfs_unregister_hctxs+0x24a/0x2d0 block/blk-mq-sysfs.c:283
 __blk_mq_update_nr_hw_queues block/blk-mq.c:4727 [inline]
 blk_mq_update_nr_hw_queues+0x8a3/0x1350 block/blk-mq.c:4773
 nbd_start_device+0x157/0xd70 drivers/block/nbd.c:1362
 nbd_start_device_ioctl drivers/block/nbd.c:1412 [inline]
 __nbd_ioctl drivers/block/nbd.c:1487 [inline]
 nbd_ioctl+0x553/0xcc0 drivers/block/nbd.c:1527
 blkdev_ioctl+0x2f2/0x750 block/ioctl.c:633
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __x64_sys_ioctl+0x18b/0x210 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7ff8f1a7ad39
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff8f2c4e0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ff8f1b9bf80 RCX: 00007ff8f1a7ad39
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000007
RBP: 00007ff8f2c4e120 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 000000000000000b R14: 00007ff8f1b9bf80 R15: 00007fffa28dad08
 </TASK>


Tested on:

commit:         826c4841 Merge tag '6.7-rc-smb3-server-part2' of git:/..
git tree:       https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git master
console output: https://syzkaller.appspot.com/x/log.txt?x=129ef91f680000
kernel config:  https://syzkaller.appspot.com/x/.config?x=58c022b9cf7593c8
dashboard link: https://syzkaller.appspot.com/bug?extid=7295389ef2000630244b
compiler:       gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40

Note: no patches were applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-10 19:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <GV1PR10MB6563B11E4E004F66BD31E37DE8AEA@GV1PR10MB6563.EURPRD10.PROD.OUTLOOK.COM>
2023-11-10 19:20 ` [syzbot] general protection fault in blk_mq_free_rqs syzbot
2022-02-10 19:17 syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox