[v6.1] possible deadlock in vmci_qp_broker_detach

5 views
Skip to first unread message

syzbot

unread,
Aug 27, 2025, 8:49:25 PM8/27/25
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 0bc96de781b4 Linux 6.1.148
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=110ebc42580000
kernel config: https://syzkaller.appspot.com/x/.config?x=5c8a5866886424a8
dashboard link: https://syzkaller.appspot.com/bug?extid=2d23b61d143113a37378
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/04c58ffc4a8a/disk-0bc96de7.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/01cad248945e/vmlinux-0bc96de7.xz
kernel image: https://storage.googleapis.com/syzbot-assets/fc5395191c77/bzImage-0bc96de7.xz

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

============================================
WARNING: possible recursive locking detected
6.1.148-syzkaller #0 Not tainted
--------------------------------------------
syz.3.103/4810 is trying to acquire lock:
ffffffff8d3e9c38 (qp_broker_list.mutex){+.+.}-{3:3}, at: vmci_qp_broker_detach+0x110/0xef0 drivers/misc/vmw_vmci/vmci_queue_pair.c:2095

but task is already holding lock:
ffffffff8d3e9c38 (qp_broker_list.mutex){+.+.}-{3:3}, at: vmci_qp_broker_detach+0x110/0xef0 drivers/misc/vmw_vmci/vmci_queue_pair.c:2095

other info that might help us debug this:
Possible unsafe locking scenario:

CPU0
----
lock(qp_broker_list.mutex);
lock(qp_broker_list.mutex);

*** DEADLOCK ***

May be due to missing lock nesting notation

1 lock held by syz.3.103/4810:
#0: ffffffff8d3e9c38 (qp_broker_list.mutex){+.+.}-{3:3}, at: vmci_qp_broker_detach+0x110/0xef0 drivers/misc/vmw_vmci/vmci_queue_pair.c:2095

stack backtrace:
CPU: 0 PID: 4810 Comm: syz.3.103 Not tainted 6.1.148-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/14/2025
Call Trace:
<TASK>
dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106
__lock_acquire+0x122f/0x7c50 kernel/locking/lockdep.c:-1
lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
__mutex_lock_common kernel/locking/mutex.c:603 [inline]
__mutex_lock+0x120/0xaf0 kernel/locking/mutex.c:747
vmci_qp_broker_detach+0x110/0xef0 drivers/misc/vmw_vmci/vmci_queue_pair.c:2095
ctx_free_ctx drivers/misc/vmw_vmci/vmci_context.c:444 [inline]
kref_put include/linux/kref.h:65 [inline]
vmci_ctx_put+0x5ec/0xc00 drivers/misc/vmw_vmci/vmci_context.c:497
vmci_ctx_enqueue_datagram+0x3a7/0x420 drivers/misc/vmw_vmci/vmci_context.c:360
dg_dispatch_as_host drivers/misc/vmw_vmci/vmci_datagram.c:276 [inline]
vmci_datagram_dispatch+0x438/0xbc0 drivers/misc/vmw_vmci/vmci_datagram.c:340
qp_notify_peer drivers/misc/vmw_vmci/vmci_queue_pair.c:1481 [inline]
vmci_qp_broker_detach+0x8b5/0xef0 drivers/misc/vmw_vmci/vmci_queue_pair.c:2188
ctx_free_ctx drivers/misc/vmw_vmci/vmci_context.c:444 [inline]
kref_put include/linux/kref.h:65 [inline]
vmci_ctx_put+0x5ec/0xc00 drivers/misc/vmw_vmci/vmci_context.c:497
vmci_host_close+0x97/0x160 drivers/misc/vmw_vmci/vmci_host.c:143
__fput+0x22c/0x920 fs/file_table.c:320
task_work_run+0x1ca/0x250 kernel/task_work.c:203
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303
do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:87
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f755bd8ebe9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc02d6e5b8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007f755bfb7da0 RCX: 00007f755bd8ebe9
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007f755bfb7da0 R08: 00000000000005d4 R09: 0000000f02d6e8af
R10: 00007f755bfb7cb0 R11: 0000000000000246 R12: 0000000000020bef
R13: 00007f755bfb6090 R14: ffffffffffffffff R15: 00007ffc02d6e6d0
</TASK>


---
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 syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Aug 27, 2025, 10:16:26 PM8/27/25
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 0bc96de781b4 Linux 6.1.148
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12addef0580000
kernel config: https://syzkaller.appspot.com/x/.config?x=5c8a5866886424a8
dashboard link: https://syzkaller.appspot.com/bug?extid=2d23b61d143113a37378
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16fb5c62580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/04c58ffc4a8a/disk-0bc96de7.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/01cad248945e/vmlinux-0bc96de7.xz
kernel image: https://storage.googleapis.com/syzbot-assets/fc5395191c77/bzImage-0bc96de7.xz

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

============================================
WARNING: possible recursive locking detected
6.1.148-syzkaller #0 Not tainted
--------------------------------------------
syz.0.630/5747 is trying to acquire lock:
ffffffff8d3e9c38 (qp_broker_list.mutex){+.+.}-{3:3}, at: vmci_qp_broker_detach+0x110/0xef0 drivers/misc/vmw_vmci/vmci_queue_pair.c:2095

but task is already holding lock:
ffffffff8d3e9c38 (qp_broker_list.mutex){+.+.}-{3:3}, at: vmci_qp_broker_detach+0x110/0xef0 drivers/misc/vmw_vmci/vmci_queue_pair.c:2095

other info that might help us debug this:
Possible unsafe locking scenario:

CPU0
----
lock(qp_broker_list.mutex);
lock(qp_broker_list.mutex);

*** DEADLOCK ***

May be due to missing lock nesting notation

1 lock held by syz.0.630/5747:
#0: ffffffff8d3e9c38 (qp_broker_list.mutex){+.+.}-{3:3}, at: vmci_qp_broker_detach+0x110/0xef0 drivers/misc/vmw_vmci/vmci_queue_pair.c:2095

stack backtrace:
CPU: 1 PID: 5747 Comm: syz.0.630 Not tainted 6.1.148-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0033:0x7f234558ebe9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc9b4cfb98 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 000000000001d884 RCX: 00007f234558ebe9
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007f23457b7da0 R08: 0000000000000001 R09: 0000000d9b4cfe8f
R10: 0000001b2df20000 R11: 0000000000000246 R12: 00007f23457b5fac
R13: 00007f23457b5fa0 R14: ffffffffffffffff R15: 00007ffc9b4cfcb0
</TASK>


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

syzbot

unread,
Aug 28, 2025, 12:18:31 AM8/28/25
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 0bc96de781b4 Linux 6.1.148
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14ec1fbc580000
kernel config: https://syzkaller.appspot.com/x/.config?x=5c8a5866886424a8
dashboard link: https://syzkaller.appspot.com/bug?extid=2d23b61d143113a37378
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15d0dc62580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10000262580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/04c58ffc4a8a/disk-0bc96de7.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/01cad248945e/vmlinux-0bc96de7.xz
kernel image: https://storage.googleapis.com/syzbot-assets/fc5395191c77/bzImage-0bc96de7.xz

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

============================================
WARNING: possible recursive locking detected
6.1.148-syzkaller #0 Not tainted
--------------------------------------------
syz.0.80/4623 is trying to acquire lock:
ffffffff8d3e9c38 (qp_broker_list.mutex){+.+.}-{3:3}, at: vmci_qp_broker_detach+0x110/0xef0 drivers/misc/vmw_vmci/vmci_queue_pair.c:2095

but task is already holding lock:
ffffffff8d3e9c38 (qp_broker_list.mutex){+.+.}-{3:3}, at: vmci_qp_broker_detach+0x110/0xef0 drivers/misc/vmw_vmci/vmci_queue_pair.c:2095

other info that might help us debug this:
Possible unsafe locking scenario:

CPU0
----
lock(qp_broker_list.mutex);
lock(qp_broker_list.mutex);

*** DEADLOCK ***

May be due to missing lock nesting notation

1 lock held by syz.0.80/4623:
#0: ffffffff8d3e9c38 (qp_broker_list.mutex){+.+.}-{3:3}, at: vmci_qp_broker_detach+0x110/0xef0 drivers/misc/vmw_vmci/vmci_queue_pair.c:2095

stack backtrace:
CPU: 1 PID: 4623 Comm: syz.0.80 Not tainted 6.1.148-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0033:0x7f4f4e18ebe9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc8c712d78 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007f4f4e3b7da0 RCX: 00007f4f4e18ebe9
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007f4f4e3b7da0 R08: 0000000000000000 R09: 0000000f8c71306f
R10: 00007f4f4e3b7cb0 R11: 0000000000000246 R12: 0000000000023d78
R13: 00007f4f4e3b6090 R14: ffffffffffffffff R15: 00007ffc8c712e90
Reply all
Reply to author
Forward
0 new messages