syzbot


possible deadlock in queue_stack_map_push_elem

Status: upstream: reported C repro on 2024/04/17 21:25
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+252bc5c744d0bba917e1@syzkaller.appspotmail.com
First crash: 221d, last: 13h32m
Cause bisection: failed (error log, bisect log)
  
Discussions (3)
Title Replies (including bot) Last reply
[syzbot] Monthly bpf report (Oct 2024) 0 (1) 2024/10/15 21:53
[syzbot] Monthly bpf report (Sep 2024) 0 (1) 2024/09/14 12:53
[syzbot] [bpf?] possible deadlock in queue_stack_map_push_elem 0 (1) 2024/04/17 21:25
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 possible deadlock in queue_stack_map_push_elem origin:upstream C 9 28d 223d 0/3 upstream: reported C repro on 2024/04/11 18:39
Last patch testing requests (10)
Created Duration User Patch Repo Result
2024/10/10 04:34 30m retest repro bpf report log
2024/10/10 04:34 23m retest repro bpf report log
2024/10/10 04:34 27m retest repro bpf report log
2024/10/10 04:34 16m retest repro bpf report log
2024/09/15 12:19 23m retest repro net report log
2024/09/15 12:19 25m retest repro net report log
2024/09/15 12:19 15m retest repro net report log
2024/08/30 20:40 22m retest repro bpf-next report log
2024/08/30 20:40 19m retest repro bpf-next report log
2024/07/05 09:06 19m retest repro bpf report log

Sample crash report:
============================================
WARNING: possible recursive locking detected
6.12.0-rc6-syzkaller-gfb86c42a2a5d #0 Not tainted
--------------------------------------------
syz-executor283/5908 is trying to acquire lock:
ffff8880326291e0 (&qs->lock){-.-.}-{2:2}, at: queue_stack_map_push_elem+0x1b2/0x660 kernel/bpf/queue_stack_maps.c:210

but task is already holding lock:
ffff88803262b1e0 (&qs->lock){-.-.}-{2:2}, at: queue_stack_map_push_elem+0x1b2/0x660 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 syz-executor283/5908:
 #0: ffffffff8ea17308 (pcpu_alloc_mutex){+.+.}-{3:3}, at: pcpu_alloc_noprof+0x27f/0x16b0 mm/percpu.c:1795
 #1: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
 #1: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
 #1: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2315 [inline]
 #1: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2357
 #2: ffff88803262b1e0 (&qs->lock){-.-.}-{2:2}, at: queue_stack_map_push_elem+0x1b2/0x660 kernel/bpf/queue_stack_maps.c:210
 #3: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
 #3: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
 #3: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2315 [inline]
 #3: ffffffff8e937da0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2357

stack backtrace:
CPU: 0 UID: 0 PID: 5908 Comm: syz-executor283 Not tainted 6.12.0-rc6-syzkaller-gfb86c42a2a5d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 print_deadlock_bug+0x483/0x620 kernel/locking/lockdep.c:3037
 check_deadlock kernel/locking/lockdep.c:3089 [inline]
 validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3891
 __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5202
 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
 queue_stack_map_push_elem+0x1b2/0x660 kernel/bpf/queue_stack_maps.c:210
 bpf_prog_216c997a1f42e404+0x40/0x44
 bpf_dispatcher_nop_func include/linux/bpf.h:1265 [inline]
 __bpf_prog_run include/linux/filter.h:701 [inline]
 bpf_prog_run include/linux/filter.h:708 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:2316 [inline]
 bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2357
 __traceiter_contention_end+0x7b/0xb0 include/trace/events/lock.h:122
 trace_contention_end+0x114/0x140 include/trace/events/lock.h:122
 __pv_queued_spin_lock_slowpath+0xb7e/0xdb0 kernel/locking/qspinlock.c:557
 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:584 [inline]
 queued_spin_lock_slowpath+0x42/0x50 arch/x86/include/asm/qspinlock.h:51
 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline]
 do_raw_spin_lock+0x272/0x370 kernel/locking/spinlock_debug.c:116
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
 _raw_spin_lock_irqsave+0xe1/0x120 kernel/locking/spinlock.c:162
 queue_stack_map_push_elem+0x1b2/0x660 kernel/bpf/queue_stack_maps.c:210
 bpf_prog_216c997a1f42e404+0x40/0x44
 bpf_dispatcher_nop_func include/linux/bpf.h:1265 [inline]
 __bpf_prog_run include/linux/filter.h:701 [inline]
 bpf_prog_run include/linux/filter.h:708 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:2316 [inline]
 bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2357
 __traceiter_contention_end+0x7b/0xb0 include/trace/events/lock.h:122
 trace_contention_end+0xf5/0x120 include/trace/events/lock.h:122
 __mutex_lock_common kernel/locking/mutex.c:617 [inline]
 __mutex_lock+0x2e5/0xd70 kernel/locking/mutex.c:752
 pcpu_alloc_noprof+0x27f/0x16b0 mm/percpu.c:1795
 bpf_prog_alloc_no_stats+0x10d/0x4b0 kernel/bpf/core.c:113
 bpf_prog_alloc+0x3a/0x1b0 kernel/bpf/core.c:145
 bpf_prog_load+0x7f7/0x20f0 kernel/bpf/syscall.c:2756
 __sys_bpf+0x4ee/0x810 kernel/bpf/syscall.c:5653
 __do_sys_bpf kernel/bpf/syscall.c:5760 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5758 [inline]
 __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5758
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fb46a6ede69
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 17 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:00007ffe86448468 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fb46a6ede69
RDX: 0000000000000090 RSI: 0000000020000a40 RDI: 0000000000000005
RBP: 0000000000000000 R08: 0000000000000000 R09: 00000000000000a0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Crashes (57):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/09 03:04 bpf fb86c42a2a5d 6b856513 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/09/15 19:43 bpf b831f83e40a2 08d8a733 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/06/04 13:25 net d6301802607b a1feae05 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/05/10 22:46 bpf 3e9bc0472b91 f7c35481 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/05/06 17:43 net a26ff37e624d c035c6de .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/04/27 17:33 bpf b2ff42c6d3ab 07b455f9 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/04/14 09:19 net f99c5f563c17 c8349e48 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/04/13 21:22 bpf 443574b03387 c8349e48 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/11/20 17:06 bpf-next 2c8b09ac2537 4fca1650 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/10/30 15:23 bpf-next e626a13f6fbb 66aeb999 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/05/19 06:16 bpf-next 6f130e4d4a5f c0f1611a .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/05/06 08:25 bpf-next a9e7715ce8b3 610f2a54 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/09/23 01:54 upstream af9c191ac2a0 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in queue_stack_map_push_elem
2024/05/21 05:09 upstream 72ece20127a3 c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in queue_stack_map_push_elem
2024/05/15 16:42 upstream 1b294a1f3561 0b3dad46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in queue_stack_map_push_elem
2024/05/10 21:13 upstream f4345f05c0df f7c35481 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in queue_stack_map_push_elem
2024/05/07 06:27 upstream ee5b455b0ada c035c6de .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in queue_stack_map_push_elem
2024/05/05 00:27 upstream 7367539ad4b0 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in queue_stack_map_push_elem
2024/05/02 05:03 upstream 0106679839f7 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in queue_stack_map_push_elem
2024/05/21 01:27 upstream 6e51b4b5bbc0 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in queue_stack_map_push_elem
2024/05/21 01:25 upstream 6e51b4b5bbc0 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in queue_stack_map_push_elem
2024/05/07 12:28 upstream dccb07f2914c cb2dcc0e .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in queue_stack_map_push_elem
2024/05/06 08:30 upstream dd5a440a31fa d884b519 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in queue_stack_map_push_elem
2024/05/06 06:30 upstream b9158815de52 610f2a54 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in queue_stack_map_push_elem
2024/05/06 09:23 upstream dd5a440a31fa d884b519 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in queue_stack_map_push_elem
2024/09/15 19:01 bpf b831f83e40a2 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/08/06 13:52 bpf 92c4ee25208d e1bdb00a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/07/18 09:04 bpf 6caf9efaa169 03114f55 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/07/14 04:59 bpf 528dd46d0fc3 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/06/09 09:41 bpf d30d0e49da71 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/06/02 13:36 bpf 7d0b3953f6d8 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/05/21 01:27 net b1fa60ec252f c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/05/21 01:25 net b1fa60ec252f c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/05/02 12:25 net 8953285d7bd6 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/05/02 10:19 net 8953285d7bd6 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/04/30 18:00 bpf b867247555c4 9e0e6af1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/04/14 10:39 bpf 443574b03387 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/09/25 10:43 net-next 151ac45348af 349a68c4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/09/01 12:11 bpf-next 2ad6d23f465a 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/08/31 00:50 net-next fbdaffe41adc f885a8ff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/08/16 17:22 bpf-next fdf1c728fac5 76120936 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/08/02 10:19 bpf-next b7ea631b9a79 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/07/29 20:40 bpf-next 7d30b8aa4fc3 5187fc86 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/07/25 05:50 net-next d7e78951a8b8 b24754ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/07/19 21:51 net-next 51835949dda3 ee4e11c8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/07/07 16:56 bpf-next fd8db07705c5 bc4ebbb5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/06/21 07:29 net-next a6ec08beec9e dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/06/16 16:34 bpf-next dedf56d775c0 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/05/18 02:29 net-next 1b294a1f3561 c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/05/11 01:51 bpf-next fcd1ed89a043 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/05/08 22:15 bpf-next e612b5c1d3ee 20bf80e1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/05/08 19:32 bpf-next e612b5c1d3ee 4cf3f9b3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/05/08 17:13 bpf-next e612b5c1d3ee 4cf3f9b3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/05/06 04:04 bpf-next a9e7715ce8b3 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/05/05 17:48 bpf-next a9e7715ce8b3 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/05/04 17:41 bpf-next a9e7715ce8b3 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
2024/05/02 05:00 bpf-next ac2f438c2a85 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in queue_stack_map_push_elem
* Struck through repros no longer work on HEAD.