[v6.6] possible deadlock in debug_check_no_obj_freed (2)

0 views
Skip to first unread message

syzbot

unread,
Jul 27, 2026, 10:49:28 AMJul 27
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c5596480c50e Linux 6.6.145
git tree: linux-6.6.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13247fde580000
kernel config: https://syzkaller.appspot.com/x/.config?x=f0bc3d90c30838b5
dashboard link: https://syzkaller.appspot.com/bug?extid=aee2a83438fac3621d8e
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/7841db191edd/disk-c5596480.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/fe5ff7d8034e/vmlinux-c5596480.xz
kernel image: https://storage.googleapis.com/syzbot-assets/8a0abae1d3eb/bzImage-c5596480.xz

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

======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.2.11696/9141 is trying to acquire lock:
ffffffff974e4618 (&obj_hash[i].lock){-.-.}-{2:2}, at: __debug_check_no_obj_freed lib/debugobjects.c:1034 [inline]
ffffffff974e4618 (&obj_hash[i].lock){-.-.}-{2:2}, at: debug_check_no_obj_freed+0x9e/0x520 lib/debugobjects.c:1075

but task is already holding lock:
ffff88802fcdd238 (&trie->lock){....}-{2:2}, at: trie_update_elem+0xc4/0xd60 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+0xb4/0x100 kernel/locking/spinlock.c:162
trie_delete_elem+0x94/0x630 kernel/bpf/lpm_trie.c:466
0xffffffffa0000a5e
bpf_dispatcher_nop_func include/linux/bpf.h:1224 [inline]
__bpf_prog_run include/linux/filter.h:617 [inline]
bpf_prog_run include/linux/filter.h:624 [inline]
bpf_prog_run_array include/linux/bpf.h:1994 [inline]
trace_call_bpf+0x333/0x6c0 kernel/trace/bpf_trace.c:143
perf_trace_run_bpf_submit+0x7a/0x1c0 kernel/events/core.c:10287
perf_trace_lock_acquire+0x342/0x400 include/trace/events/lock.h:24
trace_lock_acquire include/trace/events/lock.h:24 [inline]
lock_acquire+0x3ef/0x420 kernel/locking/lockdep.c:5725
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154
__free_object+0x3fe/0xa70 lib/debugobjects.c:371
__debug_check_no_obj_freed lib/debugobjects.c:1050 [inline]
debug_check_no_obj_freed+0x10e/0x520 lib/debugobjects.c:1075
slab_free_hook mm/slub.c:1786 [inline]
slab_free_freelist_hook+0xd2/0x1a0 mm/slub.c:1837
slab_free mm/slub.c:3830 [inline]
kmem_cache_free_bulk+0x357/0x470 mm/slub.c:3948
kfree_bulk include/linux/slab.h:517 [inline]
kvfree_rcu_bulk+0x1eb/0x470 kernel/rcu/tree.c:3032
kvfree_rcu_drain_ready kernel/rcu/tree.c:3216 [inline]
kfree_rcu_monitor+0x7d3/0xf70 kernel/rcu/tree.c:3234
process_one_work kernel/workqueue.c:2653 [inline]
process_scheduled_works+0xa60/0x1600 kernel/workqueue.c:2730
worker_thread+0xa5e/0xfe0 kernel/workqueue.c:2811
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+0x37ef/0x7d80 kernel/locking/lockdep.c:5137
lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xb4/0x100 kernel/locking/spinlock.c:162
__debug_check_no_obj_freed lib/debugobjects.c:1034 [inline]
debug_check_no_obj_freed+0x9e/0x520 lib/debugobjects.c:1075
slab_free_hook mm/slub.c:1786 [inline]
slab_free_freelist_hook+0xd2/0x1a0 mm/slub.c:1837
slab_free mm/slub.c:3830 [inline]
__kmem_cache_free+0xba/0x1f0 mm/slub.c:3843
trie_update_elem+0x783/0xd60 kernel/bpf/lpm_trie.c:443
bpf_map_update_value+0x64b/0x710 kernel/bpf/syscall.c:203
generic_map_update_batch+0x5de/0x800 kernel/bpf/syscall.c:1800
bpf_map_do_batch+0x3f2/0x600 kernel/bpf/syscall.c:5011
__sys_bpf+0x381/0x890 kernel/bpf/syscall.c:-1
__do_sys_bpf kernel/bpf/syscall.c:5582 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5580 [inline]
__x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5580
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
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.11696/9141:
#0: ffffffff8d131da0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:334 [inline]
#0: ffffffff8d131da0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:786 [inline]
#0: ffffffff8d131da0 (rcu_read_lock){....}-{1:2}, at: bpf_map_update_value+0x408/0x710 kernel/bpf/syscall.c:202
#1: ffff88802fcdd238 (&trie->lock){....}-{2:2}, at: trie_update_elem+0xc4/0xd60 kernel/bpf/lpm_trie.c:335

stack backtrace:
CPU: 1 PID: 9141 Comm: syz.2.11696 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Call Trace:
<TASK>
dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
check_noncircular+0x2fc/0x400 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+0x37ef/0x7d80 kernel/locking/lockdep.c:5137
lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xb4/0x100 kernel/locking/spinlock.c:162
__debug_check_no_obj_freed lib/debugobjects.c:1034 [inline]
debug_check_no_obj_freed+0x9e/0x520 lib/debugobjects.c:1075
slab_free_hook mm/slub.c:1786 [inline]
slab_free_freelist_hook+0xd2/0x1a0 mm/slub.c:1837
slab_free mm/slub.c:3830 [inline]
__kmem_cache_free+0xba/0x1f0 mm/slub.c:3843
trie_update_elem+0x783/0xd60 kernel/bpf/lpm_trie.c:443
bpf_map_update_value+0x64b/0x710 kernel/bpf/syscall.c:203
generic_map_update_batch+0x5de/0x800 kernel/bpf/syscall.c:1800
bpf_map_do_batch+0x3f2/0x600 kernel/bpf/syscall.c:5011
__sys_bpf+0x381/0x890 kernel/bpf/syscall.c:-1
__do_sys_bpf kernel/bpf/syscall.c:5582 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5580 [inline]
__x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5580
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f525f19de99
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f5260081028 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007f525f425fa0 RCX: 00007f525f19de99
RDX: 0000000000000038 RSI: 0000200000000240 RDI: 000000000000001a
RBP: 00007f525f233eaf R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f525f426038 R14: 00007f525f425fa0 R15: 00007ffda2457f18
</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
Reply all
Reply to author
Forward
0 new messages