==================================================================
BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x46a/0x4b0 net/rose/rose_timer.c:183
Read of size 2 at addr ffff888024e0302a by task syz-executor/6641
CPU: 0 PID: 6641 Comm: syz-executor Not tainted 6.6.100-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xac/0x200 mm/kasan/report.c:466
kasan_report+0x117/0x150 mm/kasan/report.c:579
rose_timer_expiry+0x46a/0x4b0 net/rose/rose_timer.c:183
call_timer_fn+0x16e/0x530 kernel/time/timer.c:1700
expire_timers kernel/time/timer.c:1751 [inline]
__run_timers+0x52d/0x7d0 kernel/time/timer.c:2022
run_timer_softirq+0x67/0xf0 kernel/time/timer.c:2035
handle_softirqs+0x280/0x820 kernel/softirq.c:578
__do_softirq kernel/softirq.c:612 [inline]
invoke_softirq kernel/softirq.c:452 [inline]
__irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661
irq_exit_rcu+0x9/0x20 kernel/softirq.c:673
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687
RIP: 0010:check_kcov_mode kernel/kcov.c:182 [inline]
RIP: 0010:write_comp_data kernel/kcov.c:245 [inline]
RIP: 0010:__sanitizer_cov_trace_const_cmp4+0x17/0x90 kernel/kcov.c:313
Code: 48 89 44 11 20 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 f3 0f 1e fa 48 8b 04 24 65 48 8b 15 c0 20 7e 7e 65 8b 0d c1 20 7e 7e <81> e1 00 01 ff 00 74 11 81 f9 00 01 00 00 75 5b 83 ba 1c 16 00 00
RSP: 0018:ffffc900045dee98 EFLAGS: 00000246
RAX: ffffffff813aa157 RBX: ffffc900045deec8 RCX: 0000000080000000
RDX: ffff88807a8a8000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 0000000000000001 R08: ffff88807a8a8000 R09: 0000000000000003
R10: 0000000000000004 R11: 0000000000000000 R12: ffffffff81e60297
R13: 1ffff920008bbe04 R14: dffffc0000000000 R15: ffffc900045deec8
unwind_done arch/x86/include/asm/unwind.h:50 [inline]
unwind_get_return_address+0x37/0xc0 arch/x86/kernel/unwind_orc.c:366
arch_stack_walk+0x11d/0x190 arch/x86/kernel/stacktrace.c:26
stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:122
save_stack+0xf7/0x1f0 mm/page_owner.c:128
__set_page_owner+0x1d/0x60 mm/page_owner.c:192
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554
prep_new_page mm/page_alloc.c:1561 [inline]
get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191
__alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457
pagetable_alloc include/linux/mm.h:2834 [inline]
__pte_alloc_one include/asm-generic/pgalloc.h:68 [inline]
pte_alloc_one+0x89/0x540 arch/x86/mm/pgtable.c:33
__pte_alloc+0x22/0x2a0 mm/memory.c:437
copy_pte_range mm/memory.c:1028 [inline]
copy_pmd_range mm/memory.c:1167 [inline]
copy_pud_range mm/memory.c:1204 [inline]
copy_p4d_range mm/memory.c:1228 [inline]
copy_page_range+0x2d72/0x3600 mm/memory.c:1322
dup_mmap kernel/fork.c:764 [inline]
dup_mm kernel/fork.c:1692 [inline]
copy_mm+0x1124/0x1c20 kernel/fork.c:1741
copy_process+0x16d3/0x3d70 kernel/fork.c:2506
kernel_clone+0x21b/0x840 kernel/fork.c:2914
__do_sys_clone kernel/fork.c:3057 [inline]
__se_sys_clone kernel/fork.c:3041 [inline]
__x64_sys_clone+0x18c/0x1e0 kernel/fork.c:3041
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:0x7f96dcd853d3
Code: 1f 84 00 00 00 00 00 64 48 8b 04 25 10 00 00 00 45 31 c0 31 d2 31 f6 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 89 c2 85 c0 75 2c 64 48 8b 04 25 10 00 00
RSP: 002b:00007fffd98df438 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f96dcd853d3
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000001
R10: 00005555580cf7d0 R11: 0000000000000246 R12: 0000000000000000
R13: 00000000000927c0 R14: 00000000000a3b9c R15: 00007fffd98df5d0
Allocated by task 9442:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:52
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:383
kmalloc include/linux/slab.h:600 [inline]
batadv_forw_packet_alloc+0x1e9/0x390 net/batman-adv/send.c:519
batadv_iv_ogm_aggregate_new net/batman-adv/bat_iv_ogm.c:561 [inline]
batadv_iv_ogm_queue_add+0x77b/0xcf0 net/batman-adv/bat_iv_ogm.c:669
batadv_iv_ogm_schedule_buff net/batman-adv/bat_iv_ogm.c:848 [inline]
batadv_iv_ogm_schedule+0xab3/0xe90 net/batman-adv/bat_iv_ogm.c:867
batadv_iv_send_outstanding_bat_ogm_packet+0x731/0x840 net/batman-adv/bat_iv_ogm.c:1711
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
Freed by task 9400:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x2e/0x50 mm/kasan/generic.c:522
____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1806 [inline]
slab_free_freelist_hook+0x130/0x1b0 mm/slub.c:1832
slab_free mm/slub.c:3816 [inline]
__kmem_cache_free+0xba/0x1f0 mm/slub.c:3829
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
Last potentially related work creation:
kasan_save_stack+0x3e/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492
insert_work+0x3d/0x310 kernel/workqueue.c:1651
__queue_work+0xd2c/0x1020 kernel/workqueue.c:1804
call_timer_fn+0x16e/0x530 kernel/time/timer.c:1700
expire_timers kernel/time/timer.c:1746 [inline]
__run_timers+0x558/0x7d0 kernel/time/timer.c:2022
run_timer_softirq+0x67/0xf0 kernel/time/timer.c:2035
handle_softirqs+0x280/0x820 kernel/softirq.c:578
do_softirq+0xed/0x180 kernel/softirq.c:479
__local_bh_enable_ip+0x178/0x1c0 kernel/softirq.c:406
local_bh_enable include/linux/bottom_half.h:33 [inline]
rcu_read_unlock_bh include/linux/rcupdate.h:856 [inline]
__dev_queue_xmit+0x1449/0x35a0 net/core/dev.c:4440
dev_queue_xmit include/linux/netdevice.h:3113 [inline]
neigh_hh_output include/net/neighbour.h:526 [inline]
neigh_output include/net/neighbour.h:540 [inline]
ip_finish_output2+0xcd3/0x11d0 net/ipv4/ip_output.c:235
dst_output include/net/dst.h:467 [inline]
ip_local_out net/ipv4/ip_output.c:129 [inline]
__ip_queue_xmit+0x1094/0x1a00 net/ipv4/ip_output.c:535
__tcp_transmit_skb+0x1c97/0x32a0 net/ipv4/tcp_output.c:1422
tcp_transmit_skb net/ipv4/tcp_output.c:1440 [inline]
tcp_write_xmit+0x14ee/0x6270 net/ipv4/tcp_output.c:2767
__tcp_push_pending_frames+0x97/0x340 net/ipv4/tcp_output.c:2952
tcp_sendmsg_locked+0x4286/0x4af0 net/ipv4/tcp.c:1312
tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1344
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg net/socket.c:745 [inline]
sock_write_iter+0x2bb/0x3f0 net/socket.c:1160
call_write_iter include/linux/fs.h:2018 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x43b/0x940 fs/read_write.c:584
ksys_write+0x147/0x250 fs/read_write.c:637
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
Second to last potentially related work creation:
kasan_save_stack+0x3e/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492
insert_work+0x3d/0x310 kernel/workqueue.c:1651
__queue_work+0xd2c/0x1020 kernel/workqueue.c:1804
call_timer_fn+0x16e/0x530 kernel/time/timer.c:1700
expire_timers kernel/time/timer.c:1746 [inline]
__run_timers+0x558/0x7d0 kernel/time/timer.c:2022
run_timer_softirq+0x67/0xf0 kernel/time/timer.c:2035
handle_softirqs+0x280/0x820 kernel/softirq.c:578
__do_softirq kernel/softirq.c:612 [inline]
invoke_softirq kernel/softirq.c:452 [inline]
__irq_exit_rcu+0xc7/0x190 kernel/softirq.c:661
irq_exit_rcu+0x9/0x20 kernel/softirq.c:673
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687
The buggy address belongs to the object at ffff888024e03000
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 42 bytes inside of
freed 512-byte region [ffff888024e03000, ffff888024e03200)
The buggy address belongs to the physical page:
page:ffffea0000938000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x24e00
head:ffffea0000938000 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888017841c80 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd2000(__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 10852594787, free_ts 0
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554
prep_new_page mm/page_alloc.c:1561 [inline]
get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191
__alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457
alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2120
alloc_slab_page+0x5d/0x170 mm/slub.c:1876
allocate_slab mm/slub.c:2023 [inline]
new_slab+0x87/0x2e0 mm/slub.c:2076
___slab_alloc+0xc6d/0x12f0 mm/slub.c:3230
__slab_alloc mm/slub.c:3329 [inline]
__slab_alloc_node mm/slub.c:3382 [inline]
slab_alloc_node mm/slub.c:3475 [inline]
__kmem_cache_alloc_node+0x1a2/0x260 mm/slub.c:3524
kmalloc_trace+0x2a/0xe0 mm/slab_common.c:1098
kmalloc include/linux/slab.h:600 [inline]
usb_cache_string+0x66/0x130 drivers/usb/core/message.c:1028
usb_enumerate_device drivers/usb/core/hub.c:2503 [inline]
usb_new_device+0x2fb/0x1630 drivers/usb/core/hub.c:2630
register_root_hub+0x275/0x580 drivers/usb/core/hcd.c:996
usb_add_hcd+0xb73/0x1000 drivers/usb/core/hcd.c:2963
dummy_hcd_probe+0x134/0x260 drivers/usb/gadget/udc/dummy_hcd.c:2694
platform_probe+0x13b/0x1c0 drivers/base/platform.c:1404
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x25b/0xb40 drivers/base/dd.c:658
page_owner free stack trace missing
Memory state around the buggy address:
ffff888024e02f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888024e02f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888024e03000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888024e03080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888024e03100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 48 89 44 11 20 mov %rax,0x20(%rcx,%rdx,1)
5: c3 ret
6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1)
d: 00 00 00
10: 0f 1f 00 nopl (%rax)
13: f3 0f 1e fa endbr64
17: 48 8b 04 24 mov (%rsp),%rax
1b: 65 48 8b 15 c0 20 7e mov %gs:0x7e7e20c0(%rip),%rdx # 0x7e7e20e3
22: 7e
23: 65 8b 0d c1 20 7e 7e mov %gs:0x7e7e20c1(%rip),%ecx # 0x7e7e20eb
* 2a: 81 e1 00 01 ff 00 and $0xff0100,%ecx <-- trapping instruction
30: 74 11 je 0x43
32: 81 f9 00 01 00 00 cmp $0x100,%ecx
38: 75 5b jne 0x95
3a: 83 .byte 0x83
3b: ba 1c 16 00 00 mov $0x161c,%edx