syzbot


possible deadlock in queue_stack_map_push_elem

Status: upstream: reported C repro on 2025/08/17 12:10
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+fc5e15dd603470f91634@syzkaller.appspotmail.com
First crash: 99d, last: 4d19h
Fix bisection: the issue occurs on the latest tested release (bisect log)
Crash: possible deadlock in queue_stack_map_push_elem (log)
Repro: C syz .config
  
Bug presence (2)
Date Name Commit Repro Result
2025/08/19 linux-6.6.y (ToT) bb9c90ab9c5a C [report] possible deadlock in queue_stack_map_push_elem
2025/08/19 upstream (ToT) b19a97d57c15 C Didn't crash
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in queue_stack_map_push_elem bpf 4 C error 78 233d 586d 28/29 fixed on 2025/06/10 16:19
linux-6.1 possible deadlock in queue_stack_map_push_elem origin:upstream missing-backport 4 C 23 2d00h 592d 0/3 upstream: reported C repro on 2024/04/11 18:39
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2025/11/18 21:38 0m fix candidate upstream error
2025/09/23 10:59 1h43m bisect fix linux-6.6.y OK (0) job log log

Sample crash report:
============================================
WARNING: possible recursive locking detected
syzkaller #0 Not tainted
--------------------------------------------
udevd/5159 is trying to acquire lock:
ffff88807cd4b218 (&qs->lock){-.-.}-{2:2}, at: queue_stack_map_push_elem+0x171/0x5f0 kernel/bpf/queue_stack_maps.c:210

but task is already holding lock:
ffff888029317218 (&qs->lock){-.-.}-{2:2}, at: queue_stack_map_push_elem+0x171/0x5f0 kernel/bpf/queue_stack_maps.c:210

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

       CPU0
       ----
  lock(&qs->lock);
  lock(&qs->lock);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

4 locks held by udevd/5159:
 #0: ffff88807dd605c8 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2a3/0x330 fs/file.c:1040
 #1: ffffffff8cd2fee0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline]
 #1: ffffffff8cd2fee0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:786 [inline]
 #1: ffffffff8cd2fee0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2321 [inline]
 #1: ffffffff8cd2fee0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0xde/0x3c0 kernel/trace/bpf_trace.c:2361
 #2: ffff888029317218 (&qs->lock){-.-.}-{2:2}, at: queue_stack_map_push_elem+0x171/0x5f0 kernel/bpf/queue_stack_maps.c:210
 #3: ffffffff8cd2fee0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline]
 #3: ffffffff8cd2fee0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:786 [inline]
 #3: ffffffff8cd2fee0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2321 [inline]
 #3: ffffffff8cd2fee0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0xde/0x3c0 kernel/trace/bpf_trace.c:2361

stack backtrace:
CPU: 1 PID: 5159 Comm: udevd Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106
 check_deadlock kernel/locking/lockdep.c:3062 [inline]
 validate_chain kernel/locking/lockdep.c:3856 [inline]
 __lock_acquire+0x5d40/0x7c80 kernel/locking/lockdep.c:5137
 lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0xa8/0xf0 kernel/locking/spinlock.c:162
 queue_stack_map_push_elem+0x171/0x5f0 kernel/bpf/queue_stack_maps.c:210
 bpf_prog_80daba7f9ca62790+0x42/0x46
 bpf_dispatcher_nop_func include/linux/bpf.h:1224 [inline]
 __bpf_prog_run include/linux/filter.h:612 [inline]
 bpf_prog_run include/linux/filter.h:619 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:2322 [inline]
 bpf_trace_run2+0x1d1/0x3c0 kernel/trace/bpf_trace.c:2361
 __bpf_trace_contention_end+0xdd/0x130 include/trace/events/lock.h:122
 __traceiter_contention_end+0x78/0xb0 include/trace/events/lock.h:122
 trace_contention_end+0xe6/0x110 include/trace/events/lock.h:122
 __pv_queued_spin_lock_slowpath+0x7ec/0x9d0 kernel/locking/qspinlock.c:560
 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:586 [inline]
 queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline]
 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline]
 do_raw_spin_lock+0x24e/0x2c0 kernel/locking/spinlock_debug.c:115
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
 _raw_spin_lock_irqsave+0xb4/0xf0 kernel/locking/spinlock.c:162
 queue_stack_map_push_elem+0x171/0x5f0 kernel/bpf/queue_stack_maps.c:210
 bpf_prog_80daba7f9ca62790+0x42/0x46
 bpf_dispatcher_nop_func include/linux/bpf.h:1224 [inline]
 __bpf_prog_run include/linux/filter.h:612 [inline]
 bpf_prog_run include/linux/filter.h:619 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:2322 [inline]
 bpf_trace_run2+0x1d1/0x3c0 kernel/trace/bpf_trace.c:2361
 __bpf_trace_contention_end+0xdd/0x130 include/trace/events/lock.h:122
 __traceiter_contention_end+0x78/0xb0 include/trace/events/lock.h:122
 trace_contention_end+0xc5/0xe0 include/trace/events/lock.h:122
 __mutex_lock_common kernel/locking/mutex.c:612 [inline]
 __mutex_lock+0x2fa/0xcc0 kernel/locking/mutex.c:747
 __fdget_pos+0x2a3/0x330 fs/file.c:1040
 fdget_pos include/linux/file.h:74 [inline]
 __do_sys_getdents64 fs/readdir.c:401 [inline]
 __se_sys_getdents64+0xc2/0x260 fs/readdir.c:390
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f29dd4f0d23
Code: 8b 05 d9 00 10 00 64 c7 00 16 00 00 00 31 c0 eb b0 66 0f 1f 44 00 00 b8 ff ff ff 7f 48 39 c2 48 0f 47 d0 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 8b 15 a1 00 10 00 f7 d8
RSP: 002b:00007ffcdf7f8c18 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 00005632bf162530 RCX: 00007f29dd4f0d23
RDX: 0000000000008000 RSI: 00005632bf162560 RDI: 000000000000000d
RBP: 00005632bf162534 R08: 00007f29dd5f1ac0 R09: 0000000000000000
R10: 0000000000000003 R11: 0000000000000293 R12: 00005632bf162560
R13: fffffffffffffe68 R14: 0000000000000002 R15: 00007ffcdf7f8ef0
 </TASK>

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/11/20 09:16 linux-6.6.y 0a805b6ea8cd 26ee5237 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in queue_stack_map_push_elem
2025/11/05 05:47 linux-6.6.y 0a805b6ea8cd 686bf657 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in queue_stack_map_push_elem
2025/10/19 02:21 linux-6.6.y 0bbbd97a442d 1c8c8cd8 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan possible deadlock in queue_stack_map_push_elem
2025/10/10 12:26 linux-6.6.y e617101e5626 ff1712fe .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in queue_stack_map_push_elem
2025/09/29 00:11 linux-6.6.y 147338df3487 001c9061 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan possible deadlock in queue_stack_map_push_elem
2025/08/17 14:03 linux-6.6.y bb9c90ab9c5a 1804e95e .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in queue_stack_map_push_elem
2025/08/17 12:09 linux-6.6.y bb9c90ab9c5a 1804e95e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in queue_stack_map_push_elem
* Struck through repros no longer work on HEAD.