syzbot


possible deadlock in __bpf_ringbuf_reserve

Status: upstream: reported C repro on 2024/03/08 23:13
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+f85ef54ebfb2b7619272@syzkaller.appspotmail.com
First crash: 391d, last: 15d
Bug presence (3)
Date Name Commit Repro Result
2025/01/23 linux-6.1.y (ToT) f4f677285b38 C [report] possible deadlock in __bpf_ringbuf_reserve
2024/03/09 upstream (ToT) 10d48d70e82d C [report] possible deadlock in __bpf_ringbuf_reserve
2025/01/23 upstream (ToT) 7004a2e46d16 C Didn't crash
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in __bpf_ringbuf_reserve bpf C error 2364 1d01h 388d 0/28 upstream: reported C repro on 2024/03/12 16:41
Fix bisection attempts (5)
Created Duration User Patch Repo Result
2025/01/18 17:22 1h29m bisect fix linux-6.1.y OK (0) job log log
2024/11/26 16:19 3h02m bisect fix linux-6.1.y OK (0) job log log
2024/10/20 11:45 3h30m bisect fix linux-6.1.y OK (0) job log log
2024/09/19 04:24 1h31m bisect fix linux-6.1.y OK (0) job log log
2024/04/09 05:19 1h54m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
============================================
WARNING: possible recursive locking detected
6.1.130-syzkaller #0 Not tainted
--------------------------------------------
syz-executor410/4328 is trying to acquire lock:
ffffc900047e90d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x1e6/0x600 kernel/bpf/ringbuf.c:413

but task is already holding lock:
ffffc900047c10d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x1e6/0x600 kernel/bpf/ringbuf.c:413

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

       CPU0
       ----
  lock(&rb->spinlock);
  lock(&rb->spinlock);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

4 locks held by syz-executor410/4328:
 #0: ffff8880737331b8 (&tsk->futex_exit_mutex){+.+.}-{3:3}, at: futex_cleanup_begin kernel/futex/core.c:1076 [inline]
 #0: ffff8880737331b8 (&tsk->futex_exit_mutex){+.+.}-{3:3}, at: futex_exit_release+0x30/0x1e0 kernel/futex/core.c:1128
 #1: ffffffff8d32e680 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #1: ffffffff8d32e680 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #1: ffffffff8d32e680 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2283 [inline]
 #1: ffffffff8d32e680 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x110/0x410 kernel/trace/bpf_trace.c:2323
 #2: ffffc900047c10d8 (&rb->spinlock){-.-.}-{2:2}, at: __bpf_ringbuf_reserve+0x1e6/0x600 kernel/bpf/ringbuf.c:413
 #3: ffffffff8d32e680 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #3: ffffffff8d32e680 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #3: ffffffff8d32e680 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2283 [inline]
 #3: ffffffff8d32e680 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x110/0x410 kernel/trace/bpf_trace.c:2323

stack backtrace:
CPU: 1 PID: 4328 Comm: syz-executor410 Not tainted 6.1.130-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_deadlock_bug kernel/locking/lockdep.c:2983 [inline]
 check_deadlock kernel/locking/lockdep.c:3026 [inline]
 validate_chain+0x4711/0x5950 kernel/locking/lockdep.c:3812
 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
 __bpf_ringbuf_reserve+0x1e6/0x600 kernel/bpf/ringbuf.c:413
 ____bpf_ringbuf_reserve kernel/bpf/ringbuf.c:464 [inline]
 bpf_ringbuf_reserve+0x58/0x70 kernel/bpf/ringbuf.c:456
 bpf_prog_bd6e3df97244baa1+0x34/0x6f
 bpf_dispatcher_nop_func include/linux/bpf.h:1000 [inline]
 __bpf_prog_run include/linux/filter.h:603 [inline]
 bpf_prog_run include/linux/filter.h:610 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:2284 [inline]
 bpf_trace_run2+0x1fd/0x410 kernel/trace/bpf_trace.c:2323
 __traceiter_contention_end+0x74/0xa0 include/trace/events/lock.h:122
 trace_contention_end+0x14c/0x190 include/trace/events/lock.h:122
 __pv_queued_spin_lock_slowpath+0x935/0xc50 kernel/locking/qspinlock.c:560
 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [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+0x269/0x370 kernel/locking/spinlock_debug.c:115
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
 _raw_spin_lock_irqsave+0xdd/0x120 kernel/locking/spinlock.c:162
 __bpf_ringbuf_reserve+0x1e6/0x600 kernel/bpf/ringbuf.c:413
 ____bpf_ringbuf_reserve kernel/bpf/ringbuf.c:464 [inline]
 bpf_ringbuf_reserve+0x58/0x70 kernel/bpf/ringbuf.c:456
 bpf_prog_bd6e3df97244baa1+0x34/0x6f
 bpf_dispatcher_nop_func include/linux/bpf.h:1000 [inline]
 __bpf_prog_run include/linux/filter.h:603 [inline]
 bpf_prog_run include/linux/filter.h:610 [inline]
 __bpf_trace_run kernel/trace/bpf_trace.c:2284 [inline]
 bpf_trace_run2+0x1fd/0x410 kernel/trace/bpf_trace.c:2323
 __traceiter_contention_end+0x74/0xa0 include/trace/events/lock.h:122
 trace_contention_end+0x12f/0x170 include/trace/events/lock.h:122
 __mutex_lock_common kernel/locking/mutex.c:612 [inline]
 __mutex_lock+0x2ed/0xd80 kernel/locking/mutex.c:747
 futex_cleanup_begin kernel/futex/core.c:1076 [inline]
 futex_exit_release+0x30/0x1e0 kernel/futex/core.c:1128
 exit_mm_release+0x16/0x30 kernel/fork.c:1506
 exit_mm+0xa9/0x300 kernel/exit.c:537
 do_exit+0x9f1/0x26a0 kernel/exit.c:858
 do_group_exit+0x202/0x2b0 kernel/exit.c:1021
 __do_sys_exit_group kernel/exit.c:1032 [inline]
 __se_sys_exit_group kernel/exit.c:1030 [inline]
 __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1030
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f810766fff9
Code: 90 49 c7 c0 b8 ff ff ff be e7 00 00 00 ba 3c 00 00 00 eb 12 0f 1f 44 00 00 89 d0 0f 05 48 3d 00 f0 ff ff 77 1c f4 89 f0 0f 05 <48> 3d 00 f0 ff ff 76 e7 f7 d8 64 41 89 00 eb df 0f 1f 80 00 00 00
RSP: 002b:00007ffc8ceb6718 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f810766fff9
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 00007f81076eb2b0 R08: ffffffffffffffb8 R09: 00000000000000a0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f81076eb2b0
R13: 0000000000000000 R14: 00007f81076ebd20 R15: 00007f8107641190
 </TASK>

Crashes (67):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/08 08:38 linux-6.1.y 6ae7ac5c4251 7e3bd60d .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/12/19 16:01 linux-6.1.y 52f863f820fd 1432fc84 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/08 20:39 linux-6.1.y 909ba1f1b414 20bf80e1 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/03/08 23:12 linux-6.1.y 61adba85cc40 8e75c913 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2025/03/20 08:23 linux-6.1.y 344a09659766 9209bc22 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2025/03/18 00:45 linux-6.1.y 344a09659766 ce3352cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2025/03/15 05:48 linux-6.1.y 344a09659766 e2826670 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2025/03/13 17:56 linux-6.1.y 344a09659766 44be8b44 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2025/03/02 02:58 linux-6.1.y 3a8358583626 c3901742 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2025/03/02 00:46 linux-6.1.y 3a8358583626 c3901742 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2025/02/28 19:56 linux-6.1.y 3a8358583626 67cf5345 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2025/02/21 22:19 linux-6.1.y 3a8358583626 d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2025/02/21 17:22 linux-6.1.y 3a8358583626 0808a665 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2025/02/19 02:43 linux-6.1.y 0cbb5f65e52f 9a14138f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2025/02/18 01:36 linux-6.1.y 0cbb5f65e52f 429ea007 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2025/02/17 13:30 linux-6.1.y 0cbb5f65e52f 4121cf9d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2025/02/15 10:00 linux-6.1.y 0cbb5f65e52f 40a34ec9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2025/01/31 21:02 linux-6.1.y 75cefdf153f5 aa47157c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/08/16 23:53 linux-6.1.y 117ac406ba90 e1c76ab2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2024/08/16 16:23 linux-6.1.y 117ac406ba90 e1c76ab2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/08/13 09:07 linux-6.1.y 36790ef5e00b 7b0f4b46 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/07/25 07:36 linux-6.1.y 9b3f9a5b12dc d1a1b0ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/07/25 07:35 linux-6.1.y 9b3f9a5b12dc d1a1b0ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/07/25 07:34 linux-6.1.y 9b3f9a5b12dc d1a1b0ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/07/25 07:34 linux-6.1.y 9b3f9a5b12dc d1a1b0ca .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/07/13 08:29 linux-6.1.y 266ee8e06d5b eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/06/18 17:46 linux-6.1.y eb44d83053d6 639d6cdf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/06/18 17:46 linux-6.1.y eb44d83053d6 639d6cdf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/06/18 17:05 linux-6.1.y eb44d83053d6 639d6cdf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/29 01:12 linux-6.1.y 88690811da69 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2024/05/29 01:12 linux-6.1.y 88690811da69 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2024/05/29 00:43 linux-6.1.y 88690811da69 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2024/05/29 00:43 linux-6.1.y 88690811da69 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2024/05/28 19:58 linux-6.1.y 88690811da69 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/28 19:57 linux-6.1.y 88690811da69 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/28 19:36 linux-6.1.y 88690811da69 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/28 19:34 linux-6.1.y 88690811da69 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/26 03:46 linux-6.1.y 88690811da69 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/26 03:46 linux-6.1.y 88690811da69 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/26 03:07 linux-6.1.y 88690811da69 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/14 01:16 linux-6.1.y 909ba1f1b414 fdb4c10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/12 08:41 linux-6.1.y 909ba1f1b414 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/11 09:21 linux-6.1.y 909ba1f1b414 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/10 16:10 linux-6.1.y 909ba1f1b414 f7c35481 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/10 15:52 linux-6.1.y 909ba1f1b414 f7c35481 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/10 15:52 linux-6.1.y 909ba1f1b414 f7c35481 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/10 13:16 linux-6.1.y 909ba1f1b414 de979bc2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2024/05/10 13:07 linux-6.1.y 909ba1f1b414 de979bc2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2024/05/10 13:07 linux-6.1.y 909ba1f1b414 de979bc2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2024/05/10 02:14 linux-6.1.y 909ba1f1b414 de979bc2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/10 02:11 linux-6.1.y 909ba1f1b414 de979bc2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/09 08:55 linux-6.1.y 909ba1f1b414 05079661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/09 08:55 linux-6.1.y 909ba1f1b414 05079661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/08 17:29 linux-6.1.y 909ba1f1b414 20bf80e1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/08 16:53 linux-6.1.y 909ba1f1b414 20bf80e1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/08 16:53 linux-6.1.y 909ba1f1b414 20bf80e1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/08 02:31 linux-6.1.y 909ba1f1b414 4cf3f9b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/04 09:42 linux-6.1.y 909ba1f1b414 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
2024/05/03 17:15 linux-6.1.y 909ba1f1b414 dd26401e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __bpf_ringbuf_reserve
2024/05/03 12:37 linux-6.1.y 909ba1f1b414 dd26401e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf possible deadlock in __bpf_ringbuf_reserve
* Struck through repros no longer work on HEAD.