[v6.6] possible deadlock in debug_check_no_obj_freed

4 views
Skip to first unread message

syzbot

unread,
Jul 24, 2025, 4:35:31 AMJul 24
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: dbcb8d8e4163 Linux 6.6.100
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17e0c0a2580000
kernel config: https://syzkaller.appspot.com/x/.config?x=293251cfa8d8100
dashboard link: https://syzkaller.appspot.com/bug?extid=3c1e658da7a98bd082a2
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/228604c89c04/disk-dbcb8d8e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5fbdaac0d0d9/vmlinux-dbcb8d8e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/901386da6eff/bzImage-dbcb8d8e.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+3c1e65...@syzkaller.appspotmail.com

======================================================
WARNING: possible circular locking dependency detected
6.6.100-syzkaller #0 Not tainted
------------------------------------------------------
syz.0.1809/10663 is trying to acquire lock:
ffffffff9705a1b0 (&obj_hash[i].lock){-.-.}-{2:2}, at: __debug_check_no_obj_freed lib/debugobjects.c:979 [inline]
ffffffff9705a1b0 (&obj_hash[i].lock){-.-.}-{2:2}, at: debug_check_no_obj_freed+0x13a/0x540 lib/debugobjects.c:1020

but task is already holding lock:
ffff88807d43fa38 (&trie->lock){-.-.}-{2:2}, at: trie_update_elem+0xca/0xea0 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+0xa8/0xf0 kernel/locking/spinlock.c:162
trie_delete_elem+0x96/0x6a0 kernel/bpf/lpm_trie.c:467
bpf_prog_0605f9f479290f07+0x1d/0x3b
bpf_dispatcher_nop_func include/linux/bpf.h:1213 [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
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
debug_object_activate+0x6c/0x4b0 lib/debugobjects.c:709
debug_rcu_head_queue kernel/rcu/rcu.h:227 [inline]
kvfree_call_rcu+0x99/0x780 kernel/rcu/tree.c:3443
cfg80211_update_known_bss+0x172/0x900 net/wireless/scan.c:-1
__cfg80211_bss_update+0x144/0x21f0 net/wireless/scan.c:1871
cfg80211_inform_single_bss_frame_data net/wireless/scan.c:2981 [inline]
cfg80211_inform_bss_frame_data+0xaea/0x12b0 net/wireless/scan.c:3012
ieee80211_bss_info_update+0x70b/0x930 net/mac80211/scan.c:211
ieee80211_rx_bss_info net/mac80211/ibss.c:1124 [inline]
ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1613 [inline]
ieee80211_ibss_rx_queued_mgmt+0x17c9/0x2ac0 net/mac80211/ibss.c:1642
ieee80211_iface_process_skb net/mac80211/iface.c:1643 [inline]
ieee80211_iface_work+0x717/0xc70 net/mac80211/iface.c:1697
cfg80211_wiphy_work+0x225/0x260 net/wireless/core.c:437
process_one_work kernel/workqueue.c:2634 [inline]
process_scheduled_works+0xa45/0x15b0 kernel/workqueue.c:2711
worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792
kthread+0x2fa/0x390 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

-> #0 (&obj_hash[i].lock){-.-.}-{2:2}:
check_prev_add kernel/locking/lockdep.c:3134 [inline]
check_prevs_add kernel/locking/lockdep.c:3253 [inline]
validate_chain kernel/locking/lockdep.c:3869 [inline]
__lock_acquire+0x2ddb/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
__debug_check_no_obj_freed lib/debugobjects.c:979 [inline]
debug_check_no_obj_freed+0x13a/0x540 lib/debugobjects.c:1020
slab_free_hook mm/slub.c:1781 [inline]
slab_free_freelist_hook+0xd2/0x1b0 mm/slub.c:1832
slab_free mm/slub.c:3816 [inline]
__kmem_cache_free+0xba/0x1f0 mm/slub.c:3829
trie_update_elem+0x6d1/0xea0 kernel/bpf/lpm_trie.c:444
bpf_map_update_value+0x660/0x720 kernel/bpf/syscall.c:201
generic_map_update_batch+0x5e0/0x810 kernel/bpf/syscall.c:1794
bpf_map_do_batch+0x3d7/0x610 kernel/bpf/syscall.c:5001
__sys_bpf+0x31b/0x800 kernel/bpf/syscall.c:-1
__do_sys_bpf kernel/bpf/syscall.c:5571 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5569 [inline]
__x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5569
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

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.0.1809/10663:
#0: ffffffff8cd2fba0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline]
#0: ffffffff8cd2fba0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:786 [inline]
#0: ffffffff8cd2fba0 (rcu_read_lock){....}-{1:2}, at: bpf_map_update_value+0x41d/0x720 kernel/bpf/syscall.c:200
#1: ffff88807d43fa38 (&trie->lock){-.-.}-{2:2}, at: trie_update_elem+0xca/0xea0 kernel/bpf/lpm_trie.c:335

stack backtrace:
CPU: 1 PID: 10663 Comm: syz.0.1809 Not tainted 6.6.100-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
<TASK>
dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106
check_noncircular+0x2bd/0x3c0 kernel/locking/lockdep.c:2187
check_prev_add kernel/locking/lockdep.c:3134 [inline]
check_prevs_add kernel/locking/lockdep.c:3253 [inline]
validate_chain kernel/locking/lockdep.c:3869 [inline]
__lock_acquire+0x2ddb/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
__debug_check_no_obj_freed lib/debugobjects.c:979 [inline]
debug_check_no_obj_freed+0x13a/0x540 lib/debugobjects.c:1020
slab_free_hook mm/slub.c:1781 [inline]
slab_free_freelist_hook+0xd2/0x1b0 mm/slub.c:1832
slab_free mm/slub.c:3816 [inline]
__kmem_cache_free+0xba/0x1f0 mm/slub.c:3829
trie_update_elem+0x6d1/0xea0 kernel/bpf/lpm_trie.c:444
bpf_map_update_value+0x660/0x720 kernel/bpf/syscall.c:201
generic_map_update_batch+0x5e0/0x810 kernel/bpf/syscall.c:1794
bpf_map_do_batch+0x3d7/0x610 kernel/bpf/syscall.c:5001
__sys_bpf+0x31b/0x800 kernel/bpf/syscall.c:-1
__do_sys_bpf kernel/bpf/syscall.c:5571 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5569 [inline]
__x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5569
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:0x7f151d18e9a9
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:00007f151e0b0038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007f151d3b5fa0 RCX: 00007f151d18e9a9
RDX: 0000000000000038 RSI: 0000200000000240 RDI: 000000000000001a
RBP: 00007f151d210d69 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f151d3b5fa0 R15: 00007ffcfc06f128
</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

syzbot

unread,
Dec 16, 2025, 4:24:17 PM (2 days ago) Dec 16
to syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages