==================================================================
BUG: KASAN: slab-use-after-free in __lock_acquire+0x2dd6/0x3b30 kernel/locking/lockdep.c:5005
Read of size 8 at addr ffff88801b425290 by task kworker/u32:0/10
CPU: 0 PID: 10 Comm: kworker/u32:0 Not tainted 6.9.0-rc6-syzkaller-00290-gb9158815de52 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: bat_events batadv_nc_worker
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
__lock_acquire+0x2dd6/0x3b30 kernel/locking/lockdep.c:5005
lock_acquire kernel/locking/lockdep.c:5754 [inline]
lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:553 [inline]
try_to_wake_up+0x9a/0x13e0 kernel/sched/core.c:4262
call_timer_fn+0x1a0/0x610 kernel/time/timer.c:1793
expire_timers kernel/time/timer.c:1844 [inline]
__run_timers+0x74b/0xaf0 kernel/time/timer.c:2418
__run_timer_base kernel/time/timer.c:2429 [inline]
__run_timer_base kernel/time/timer.c:2422 [inline]
run_timer_base+0x111/0x190 kernel/time/timer.c:2438
run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2448
__do_softirq+0x218/0x922 kernel/softirq.c:554
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu kernel/softirq.c:633 [inline]
irq_exit_rcu+0xb9/0x120 kernel/softirq.c:645
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:409 [inline]
RIP: 0010:batadv_nc_worker+0x18e/0x10f0 net/batman-adv/network-coding.c:719
Code: 00 00 00 00 50 e8 f2 62 d4 f6 e8 3d 7d 3a 00 31 ff 41 89 c7 89 c6 e8 11 fc f5 f6 45 85 ff 58 0f 85 fa 0a 00 00 e8 22 01 f6 f6 <48> 89 d8 48 c1 e8 03 42 80 3c 30 00 0f 85 47 0e 00 00 4c 8b 2b 4d
RSP: 0018:ffffc900003c7ba0 EFLAGS: 00000293
RAX: 0000000000000000 RBX: ffff888066c595e8 RCX: ffffffff8a987359
RDX: ffff888015718000 RSI: ffffffff8a98684e RDI: 0000000000000001
RBP: 00000000000002bd R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000002 R12: ffff88801f6c4a40
R13: 0000000000000000 R14: dffffc0000000000 R15: 0000000000000001
process_one_work+0x902/0x1a30 kernel/workqueue.c:3267
process_scheduled_works kernel/workqueue.c:3348 [inline]
worker_thread+0x6c8/0xf70 kernel/workqueue.c:3429
kthread+0x2c1/0x3a0 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Allocated by task 9822:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:312 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:338
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3798 [inline]
slab_alloc_node mm/slub.c:3845 [inline]
kmem_cache_alloc_node+0x177/0x340 mm/slub.c:3888
alloc_task_struct_node kernel/fork.c:176 [inline]
dup_task_struct kernel/fork.c:1107 [inline]
copy_process+0x4a3/0x6f00 kernel/fork.c:2220
kernel_clone+0xfd/0x980 kernel/fork.c:2797
__do_compat_sys_ia32_clone+0xb7/0x100 arch/x86/kernel/sys_ia32.c:254
do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
__do_fast_syscall_32+0x75/0x120 arch/x86/entry/common.c:386
do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
Freed by task 0:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object mm/kasan/common.c:240 [inline]
__kasan_slab_free+0x11d/0x1a0 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2106 [inline]
slab_free mm/slub.c:4280 [inline]
kmem_cache_free+0x12e/0x380 mm/slub.c:4344
put_task_struct include/linux/sched/task.h:138 [inline]
put_task_struct include/linux/sched/task.h:125 [inline]
delayed_put_task_struct+0x22c/0x300 kernel/exit.c:229
rcu_do_batch kernel/rcu/tree.c:2196 [inline]
rcu_core+0x828/0x16b0 kernel/rcu/tree.c:2471
__do_softirq+0x218/0x922 kernel/softirq.c:554
Last potentially related work creation:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
__kasan_record_aux_stack+0xba/0xd0 mm/kasan/generic.c:541
__call_rcu_common.constprop.0+0x9a/0x790 kernel/rcu/tree.c:2734
put_task_struct_rcu_user kernel/exit.c:235 [inline]
put_task_struct_rcu_user+0x87/0xd0 kernel/exit.c:232
release_task+0xe7d/0x1b10 kernel/exit.c:285
wait_task_zombie kernel/exit.c:1189 [inline]
wait_consider_task+0x17c2/0x4150 kernel/exit.c:1416
do_wait_thread kernel/exit.c:1479 [inline]
__do_wait+0x1e2/0x890 kernel/exit.c:1597
do_wait+0x219/0x570 kernel/exit.c:1631
kernel_wait4+0x16c/0x280 kernel/exit.c:1790
__do_compat_sys_wait4+0x159/0x170 kernel/exit.c:1848
do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
__do_fast_syscall_32+0x75/0x120 arch/x86/entry/common.c:386
do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
Second to last potentially related work creation:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
__kasan_record_aux_stack+0xba/0xd0 mm/kasan/generic.c:541
task_work_add+0x88/0x2a0 kernel/task_work.c:48
scheduler_tick+0x22e/0x650 kernel/sched/core.c:5689
update_process_times+0x199/0x220 kernel/time/timer.c:2491
tick_sched_handle kernel/time/tick-sched.c:276 [inline]
tick_nohz_handler+0x376/0x530 kernel/time/tick-sched.c:297
__run_hrtimer kernel/time/hrtimer.c:1692 [inline]
__hrtimer_run_queues+0x657/0xcc0 kernel/time/hrtimer.c:1756
hrtimer_interrupt+0x31b/0x800 kernel/time/hrtimer.c:1818
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline]
__sysvec_apic_timer_interrupt+0x10f/0x450 arch/x86/kernel/apic/apic.c:1049
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
The buggy address belongs to the object at ffff88801b424880
which belongs to the cache task_struct of size 9024
The buggy address is located 2576 bytes inside of
freed 9024-byte region [ffff88801b424880, ffff88801b426bc0)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1b420
head: order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88805a6eb001
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888015e96140 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000030003 00000001ffffffff ffff88805a6eb001
head: 00fff00000000840 ffff888015e96140 0000000000000000 dead000000000001
head: 0000000000000000 0000000000030003 00000001ffffffff ffff88805a6eb001
head: 00fff00000000003 ffffea00006d0801 ffffea00006d0848 00000000ffffffff
head: 0000000800000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 80, tgid 1576771370 (kworker/u32:4), ts 80, free_ts 0
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d4/0x350 mm/page_alloc.c:1534
prep_new_page mm/page_alloc.c:1541 [inline]
get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3317
__alloc_pages+0x22b/0x2460 mm/page_alloc.c:4575
__alloc_pages_node include/linux/gfp.h:238 [inline]
alloc_pages_node include/linux/gfp.h:261 [inline]
alloc_slab_page mm/slub.c:2175 [inline]
allocate_slab mm/slub.c:2338 [inline]
new_slab+0xcc/0x3a0 mm/slub.c:2391
___slab_alloc+0x670/0x16d0 mm/slub.c:3525
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3610
__slab_alloc_node mm/slub.c:3663 [inline]
slab_alloc_node mm/slub.c:3835 [inline]
kmem_cache_alloc_node+0x10a/0x340 mm/slub.c:3888
alloc_task_struct_node kernel/fork.c:176 [inline]
dup_task_struct kernel/fork.c:1107 [inline]
copy_process+0x4a3/0x6f00 kernel/fork.c:2220
kernel_clone+0xfd/0x980 kernel/fork.c:2797
user_mode_thread+0xb4/0xf0 kernel/fork.c:2875
call_usermodehelper_exec_work kernel/umh.c:172 [inline]
call_usermodehelper_exec_work+0xcb/0x170 kernel/umh.c:158
process_one_work+0x902/0x1a30 kernel/workqueue.c:3267
process_scheduled_works kernel/workqueue.c:3348 [inline]
worker_thread+0x6c8/0xf70 kernel/workqueue.c:3429
kthread+0x2c1/0x3a0 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
page_owner free stack trace missing
Memory state around the buggy address:
ffff88801b425180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88801b425200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88801b425280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88801b425300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88801b425380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 00 00 add %al,(%rax)
2: 00 00 add %al,(%rax)
4: 50 push %rax
5: e8 f2 62 d4 f6 call 0xf6d462fc
a: e8 3d 7d 3a 00 call 0x3a7d4c
f: 31 ff xor %edi,%edi
11: 41 89 c7 mov %eax,%r15d
14: 89 c6 mov %eax,%esi
16: e8 11 fc f5 f6 call 0xf6f5fc2c
1b: 45 85 ff test %r15d,%r15d
1e: 58 pop %rax
1f: 0f 85 fa 0a 00 00 jne 0xb1f
25: e8 22 01 f6 f6 call 0xf6f6014c
* 2a: 48 89 d8 mov %rbx,%rax <-- trapping instruction
2d: 48 c1 e8 03 shr $0x3,%rax
31: 42 80 3c 30 00 cmpb $0x0,(%rax,%r14,1)
36: 0f 85 47 0e 00 00 jne 0xe83
3c: 4c 8b 2b mov (%rbx),%r13
3f: 4d rex.WRB