syzbot


WARNING: locking bug in trie_delete_elem

Status: auto-obsoleted due to no activity on 2025/02/20 23:52
Subsystems: bpf
[Documentation on labels]
Reported-by: syzbot+b506de56cbbb63148c33@syzkaller.appspotmail.com
First crash: 148d, last: 105d
Cause bisection: introduced by (bisect log) :
commit 4febce44cfebcb490b196d5d10ae9f403ca4c956
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Tue Oct 1 08:42:03 2024 +0000

  posix-timers: Cure si_sys_private race

Crash: lost connection to test machine (log)
Repro: C syz .config
  
Discussions (3)
Title Replies (including bot) Last reply
[syzbot] Monthly bpf report (Dec 2024) 0 (1) 2024/12/19 21:40
[PATCH] bpf: Convert lpm_trie::lock to 'raw_spinlock_t' 14 (14) 2024/11/17 01:24
[syzbot] [bpf?] WARNING: locking bug in trie_delete_elem 3 (5) 2024/11/13 11:04
Last patch testing requests (6)
Created Duration User Patch Repo Result
2024/12/27 00:53 17m retest repro upstream OK log
2024/12/27 00:53 17m retest repro upstream OK log
2024/12/27 00:53 17m retest repro upstream OK log
2024/12/27 00:53 17m retest repro upstream OK log
2024/12/27 00:53 17m retest repro upstream OK log
2024/12/26 23:58 25m retest repro linux-next OK log

Sample crash report:
=============================
[ BUG: Invalid wait context ]
6.13.0-rc1-syzkaller-00239-g9a6e8c7c3a02 #0 Not tainted
-----------------------------
syz.1.342/7291 is trying to lock:
ffff88805bb2aa00 (&trie->lock){..-.}-{3:3}, at: trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462
other info that might help us debug this:
context-{5:5}
2 locks held by syz.1.342/7291:
 #0: ffff8880b863e758 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:598
 #1: ffffffff8e937aa0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
 #1: ffffffff8e937aa0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
 #1: ffffffff8e937aa0 (rcu_read_lock){....}-{1:3}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2350 [inline]
 #1: ffffffff8e937aa0 (rcu_read_lock){....}-{1:3}, at: bpf_trace_run4+0x244/0x590 kernel/trace/bpf_trace.c:2394
stack backtrace:
CPU: 0 UID: 0 PID: 7291 Comm: syz.1.342 Not tainted 6.13.0-rc1-syzkaller-00239-g9a6e8c7c3a02 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 print_lock_invalid_wait_context kernel/locking/lockdep.c:4826 [inline]
 check_wait_context kernel/locking/lockdep.c:4898 [inline]
 __lock_acquire+0x15a8/0x2100 kernel/locking/lockdep.c:5176
 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
 trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:462
 bpf_prog_6aea58caec58c56e+0x43/0x4c
 bpf_dispatcher_nop_func include/linux/bpf.h:1290 [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:2351 [inline]
 bpf_trace_run4+0x334/0x590 kernel/trace/bpf_trace.c:2394
 __traceiter_sched_switch+0x98/0xd0 include/trace/events/sched.h:222
 trace_sched_switch include/trace/events/sched.h:222 [inline]
 __schedule+0x2267/0x4be0 kernel/sched/core.c:6753
 preempt_schedule_common+0x84/0xd0 kernel/sched/core.c:6935
 preempt_schedule+0xe1/0xf0 kernel/sched/core.c:6959
 preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk.S:12
 class_preempt_destructor include/linux/preempt.h:480 [inline]
 try_to_wake_up+0x9c3/0x1470 kernel/sched/core.c:4328
 wake_up_process kernel/sched/core.c:4454 [inline]
 wake_up_q+0xc8/0x120 kernel/sched/core.c:1066
 futex_wake+0x523/0x5c0 kernel/futex/waitwake.c:199
 do_futex+0x392/0x560 kernel/futex/syscalls.c:107
 __do_sys_futex kernel/futex/syscalls.c:179 [inline]
 __se_sys_futex+0x3f9/0x480 kernel/futex/syscalls.c:160
 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:0x7f0916f7fed9
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:00007f0917e480e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: ffffffffffffffda RBX: 00007f0917145fa8 RCX: 00007f0916f7fed9
RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f0917145fac
RBP: 00007f0917145fa0 R08: 7fffffffffffffff R09: 0000000000000000
R10: 0000000000000009 R11: 0000000000000246 R12: 00007f0917145fac
R13: 0000000000000000 R14: 00007fff8d27a7a0 R15: 00007fff8d27a888
 </TASK>

Crashes (23132):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/07 05:13 upstream 9a6e8c7c3a02 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root WARNING: locking bug in trie_delete_elem
2024/12/07 03:50 upstream b8f52214c61a 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root WARNING: locking bug in trie_delete_elem
2024/12/06 22:51 upstream b8f52214c61a 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/12/06 21:13 upstream b8f52214c61a 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING: locking bug in trie_delete_elem
2024/12/06 20:55 upstream b8f52214c61a 9ac0fdc6 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING: locking bug in trie_delete_elem
2024/12/06 20:51 upstream b8f52214c61a 9ac0fdc6 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: locking bug in trie_delete_elem
2024/12/04 08:09 upstream ceb8bf2ceaa7 b50eb251 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: locking bug in trie_delete_elem
2024/12/03 07:36 upstream cdd30ebb1b9f bb326ffb .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: locking bug in trie_delete_elem
2024/12/03 06:41 upstream cdd30ebb1b9f bb326ffb .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: locking bug in trie_delete_elem
2024/12/01 03:12 upstream d8b78066f4c9 68914665 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: locking bug in trie_delete_elem
2024/12/01 02:51 upstream d8b78066f4c9 68914665 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING: locking bug in trie_delete_elem
2024/12/06 22:58 upstream b8f52214c61a 9ac0fdc6 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING: locking bug in trie_delete_elem
2024/12/12 17:11 net 15bfb14727bc 941924eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/12 16:11 net 15bfb14727bc 941924eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/12 15:31 net 15bfb14727bc 941924eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/12 12:48 net 15bfb14727bc 941924eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/12 12:29 net 15bfb14727bc 941924eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/12 05:13 net 15bfb14727bc ff949d25 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/12 03:38 net 3dd002f20098 ff949d25 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/12 01:58 net 3dd002f20098 ff949d25 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/11 23:38 net 3dd002f20098 ff949d25 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/11 12:03 net 3dd002f20098 ff949d25 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/11 07:50 net 3dd002f20098 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/11 06:50 net 3dd002f20098 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/11 04:43 net 51a00be6a099 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/11 04:43 net 51a00be6a099 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/10 09:44 net f136552b7ce3 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/10 04:15 net f136552b7ce3 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/10 02:52 net b4906787d49b cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/09 20:26 net b4906787d49b 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/06 13:31 bpf e2cf913314b9 946d28f0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/12 23:51 net-next 96b6fcc0ee41 941924eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/12 22:31 net-next 96b6fcc0ee41 941924eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/12 18:51 net-next 96b6fcc0ee41 941924eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/12 15:51 net-next 96b6fcc0ee41 941924eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/12 02:40 net-next c0b8980e6041 ff949d25 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/12 00:09 net-next 65fb414c93f4 ff949d25 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/11 13:27 net-next 65fb414c93f4 ff949d25 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/11 06:34 net-next 65fb414c93f4 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/10 11:05 net-next e58b4771af2b cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/10 03:55 net-next e58b4771af2b cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/10 01:31 net-next 6145fefc1e42 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/09 21:35 net-next 6145fefc1e42 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/08 23:40 bpf-next d6212d82bf26 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce WARNING: locking bug in trie_delete_elem
2024/12/11 09:41 linux-next af2ea8ab7a54 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/12/11 09:24 linux-next af2ea8ab7a54 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/12/11 09:07 linux-next af2ea8ab7a54 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/12/11 09:06 linux-next af2ea8ab7a54 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/12/11 06:59 linux-next af2ea8ab7a54 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/12/11 01:09 linux-next af2ea8ab7a54 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/12/10 17:19 linux-next af2ea8ab7a54 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/12/10 16:25 linux-next af2ea8ab7a54 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/12/10 16:22 linux-next af2ea8ab7a54 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/12/10 15:21 linux-next af2ea8ab7a54 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/12/10 15:11 linux-next af2ea8ab7a54 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/12/10 15:09 linux-next af2ea8ab7a54 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/12/10 07:02 linux-next af2ea8ab7a54 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/12/10 06:48 linux-next af2ea8ab7a54 cfc402b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/12/10 01:44 linux-next af2ea8ab7a54 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/12/10 01:37 linux-next af2ea8ab7a54 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/12/09 19:56 linux-next af2ea8ab7a54 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
2024/10/31 13:19 linux-next f9f24ca362a4 fb888278 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: locking bug in trie_delete_elem
* Struck through repros no longer work on HEAD.