Hello,
syzbot found the following issue on:
HEAD commit: 7b34dc04e4ff Linux 6.1.154
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=14708942580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=7eb38bd5021fec61
dashboard link:
https://syzkaller.appspot.com/bug?extid=03904286561714603295
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/cb7cb7b3a100/disk-7b34dc04.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/e06d58b4fc92/vmlinux-7b34dc04.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/ed0693e83723/bzImage-7b34dc04.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+039042...@syzkaller.appspotmail.com
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.2.808/6436 is trying to acquire lock:
ffffffff96e33ec8 (&obj_hash[i].lock){-.-.}-{2:2}, at: __debug_check_no_obj_freed lib/debugobjects.c:968 [inline]
ffffffff96e33ec8 (&obj_hash[i].lock){-.-.}-{2:2}, at: debug_check_no_obj_freed+0x136/0x530 lib/debugobjects.c:1009
but task is already holding lock:
ffff88805291a238 (&trie->lock){-.-.}-{2:2}, at: trie_update_elem+0xc4/0xe90 kernel/bpf/lpm_trie.c:335
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&trie->lock){-.-.}-{2:2}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162
trie_delete_elem+0x90/0x690 kernel/bpf/lpm_trie.c:467
0xffffffffa0000a0e
bpf_dispatcher_nop_func include/linux/bpf.h:1011 [inline]
__bpf_prog_run include/linux/filter.h:596 [inline]
bpf_prog_run include/linux/filter.h:610 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2285 [inline]
bpf_trace_run2+0x30a/0x3b0 kernel/trace/bpf_trace.c:2324
trace_contention_end+0x13f/0x190 include/trace/events/lock.h:122
__pv_queued_spin_lock_slowpath+0x7e8/0x9c0 kernel/locking/qspinlock.c:560
pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [inline]
queued_spin_lock_slowpath+0x43/0x50 arch/x86/include/asm/qspinlock.h:51
queued_spin_lock include/asm-generic/qspinlock.h:114 [inline]
do_raw_spin_lock+0x217/0x280 kernel/locking/spinlock_debug.c:115
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
_raw_spin_lock_irqsave+0xb0/0xf0 kernel/locking/spinlock.c:162
__debug_check_no_obj_freed lib/debugobjects.c:968 [inline]
debug_check_no_obj_freed+0x136/0x530 lib/debugobjects.c:1009
slab_free_hook mm/slub.c:1704 [inline]
slab_free_freelist_hook+0xd2/0x1a0 mm/slub.c:1755
slab_free mm/slub.c:3687 [inline]
kmem_cache_free+0xf7/0x290 mm/slub.c:3709
kernfs_put+0x319/0x490 fs/kernfs/dir.c:568
kernfs_remove_by_name_ns+0xe0/0x150 fs/kernfs/dir.c:1668
kernfs_remove_by_name include/linux/kernfs.h:622 [inline]
remove_files fs/sysfs/group.c:28 [inline]
sysfs_remove_group+0xf8/0x290 fs/sysfs/group.c:288
sysfs_remove_groups+0x50/0xa0 fs/sysfs/group.c:312
device_remove_groups drivers/base/core.c:2759 [inline]
device_remove_attrs+0x205/0x250 drivers/base/core.c:2979
device_del+0x620/0xa70 drivers/base/core.c:3884
unregister_netdevice_many+0x1393/0x1840 net/core/dev.c:11017
unregister_netdevice_queue+0x31c/0x360 net/core/dev.c:10921
unregister_netdevice include/linux/netdevice.h:3075 [inline]
__tun_detach+0xd4a/0x1500 drivers/net/tun.c:685
tun_detach drivers/net/tun.c:701 [inline]
tun_chr_close+0x109/0x1b0 drivers/net/tun.c:3492
__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+0xee/0x180 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
-> #0 (&obj_hash[i].lock){-.-.}-{2:2}:
check_prev_add kernel/locking/lockdep.c:3090 [inline]
check_prevs_add kernel/locking/lockdep.c:3209 [inline]
validate_chain kernel/locking/lockdep.c:3825 [inline]
__lock_acquire+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049
lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162
__debug_check_no_obj_freed lib/debugobjects.c:968 [inline]
debug_check_no_obj_freed+0x136/0x530 lib/debugobjects.c:1009
slab_free_hook mm/slub.c:1704 [inline]
slab_free_freelist_hook+0xd2/0x1a0 mm/slub.c:1755
slab_free mm/slub.c:3687 [inline]
__kmem_cache_free+0xb6/0x1f0 mm/slub.c:3700
trie_update_elem+0x6c1/0xe90 kernel/bpf/lpm_trie.c:444
bpf_map_update_value+0x59e/0x670 kernel/bpf/syscall.c:228
generic_map_update_batch+0x569/0x850 kernel/bpf/syscall.c:1709
bpf_map_do_batch+0x466/0x600 kernel/bpf/syscall.c:-1
__sys_bpf+0x65f/0x6d0 kernel/bpf/syscall.c:-1
__do_sys_bpf kernel/bpf/syscall.c:5131 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5129 [inline]
__x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5129
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&trie->lock);
lock(&obj_hash[i].lock);
lock(&trie->lock);
lock(&obj_hash[i].lock);
*** DEADLOCK ***
2 locks held by syz.2.808/6436:
#0: ffffffff8cb2abe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#0: ffffffff8cb2abe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#0: ffffffff8cb2abe0 (rcu_read_lock){....}-{1:2}, at: bpf_map_update_value+0x375/0x670 kernel/bpf/syscall.c:227
#1: ffff88805291a238 (&trie->lock){-.-.}-{2:2}, at: trie_update_elem+0xc4/0xe90 kernel/bpf/lpm_trie.c:335
stack backtrace:
CPU: 0 PID: 6436 Comm: syz.2.808 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
Call Trace:
<TASK>
dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106
check_noncircular+0x274/0x310 kernel/locking/lockdep.c:2170
check_prev_add kernel/locking/lockdep.c:3090 [inline]
check_prevs_add kernel/locking/lockdep.c:3209 [inline]
validate_chain kernel/locking/lockdep.c:3825 [inline]
__lock_acquire+0x2cf8/0x7c50 kernel/locking/lockdep.c:5049
lock_acquire+0x1b4/0x490 kernel/locking/lockdep.c:5662
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xa4/0xf0 kernel/locking/spinlock.c:162
__debug_check_no_obj_freed lib/debugobjects.c:968 [inline]
debug_check_no_obj_freed+0x136/0x530 lib/debugobjects.c:1009
slab_free_hook mm/slub.c:1704 [inline]
slab_free_freelist_hook+0xd2/0x1a0 mm/slub.c:1755
slab_free mm/slub.c:3687 [inline]
__kmem_cache_free+0xb6/0x1f0 mm/slub.c:3700
trie_update_elem+0x6c1/0xe90 kernel/bpf/lpm_trie.c:444
bpf_map_update_value+0x59e/0x670 kernel/bpf/syscall.c:228
generic_map_update_batch+0x569/0x850 kernel/bpf/syscall.c:1709
bpf_map_do_batch+0x466/0x600 kernel/bpf/syscall.c:-1
__sys_bpf+0x65f/0x6d0 kernel/bpf/syscall.c:-1
__do_sys_bpf kernel/bpf/syscall.c:5131 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5129 [inline]
__x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:5129
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fb875b8eec9
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:00007fb8769b5038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007fb875de5fa0 RCX: 00007fb875b8eec9
RDX: 0000000000000038 RSI: 0000200000000240 RDI: 000000000000001a
RBP: 00007fb875c11f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fb875de6038 R14: 00007fb875de5fa0 R15: 00007ffd49222088
</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