syzbot


WARNING: refcount bug in bt_tags_iter

Status: auto-obsoleted due to no activity on 2023/08/15 16:51
Reported-by: syzbot+c82f67ad9bb470002d46@syzkaller.appspotmail.com
First crash: 585d, last: 585d

Sample crash report:
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 0 PID: 27764 at lib/refcount.c:28 refcount_warn_saturate+0x14e/0x1a0 lib/refcount.c:28
Modules linked in:
CPU: 0 PID: 27764 Comm: syz-executor.1 Not tainted 5.15.107-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023
RIP: 0010:refcount_warn_saturate+0x14e/0x1a0 lib/refcount.c:28
Code: 09 01 48 c7 c7 20 15 d8 8a e8 de bd 45 fd 0f 0b eb 8d e8 c5 db 79 fd c6 05 88 f9 c9 09 01 48 c7 c7 80 15 d8 8a e8 c2 bd 45 fd <0f> 0b e9 6e ff ff ff e8 a6 db 79 fd c6 05 6a f9 c9 09 01 48 c7 c7
RSP: 0018:ffffc900033bf9e0 EFLAGS: 00010246
RAX: ce27f087ee8b0600 RBX: 0000000000000003 RCX: 0000000000040000
RDX: ffffc9000c139000 RSI: 0000000000039fe4 RDI: 0000000000039fe5
RBP: 0000000000000003 R08: ffffffff816612ec R09: ffffed10173467a0
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffc900033bfc10
R13: 0000000000000000 R14: 1ffff92000677f83 R15: ffff88802fe91800
FS:  00007fe2ec814700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c00446a152 CR3: 000000002fa47000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bt_tags_iter+0x231/0x2d0 block/blk-mq-tag.c:307
 __sbitmap_for_each_set include/linux/sbitmap.h:263 [inline]
 sbitmap_for_each_set+0x2c8/0x4f0 include/linux/sbitmap.h:284
 bt_tags_for_each block/blk-mq-tag.c:334 [inline]
 __blk_mq_all_tag_iter block/blk-mq-tag.c:345 [inline]
 blk_mq_tagset_busy_iter+0x3a7/0x490 block/blk-mq-tag.c:386
 nbd_clear_que drivers/block/nbd.c:846 [inline]
 nbd_clear_sock drivers/block/nbd.c:1234 [inline]
 nbd_clear_sock_ioctl drivers/block/nbd.c:1373 [inline]
 __nbd_ioctl drivers/block/nbd.c:1401 [inline]
 nbd_ioctl+0x2cc/0xe10 drivers/block/nbd.c:1461
 blkdev_ioctl+0x333/0x6b0 block/ioctl.c:601
 block_ioctl+0xb1/0xf0 block/fops.c:493
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fe2ee2e4169
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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:00007fe2ec814168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fe2ee404120 RCX: 00007fe2ee2e4169
RDX: 0000000000000000 RSI: 000000000000ab04 RDI: 0000000000000003
RBP: 00007fe2ee33fca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffed5b35acf R14: 00007fe2ec814300 R15: 0000000000022000
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/04/17 16:49 linux-5.15.y 4fdad925aa1a c6ec7083 .config console log report info ci2-linux-5-15-kasan WARNING: refcount bug in bt_tags_iter
* Struck through repros no longer work on HEAD.