==================================================================
BUG: KASAN: use-after-free in rose_timer_expiry+0x470/0x490 net/rose/rose_timer.c:183
Read of size 2 at addr ffff888071ec382a by task syz.4.939/7936
CPU: 0 PID: 7936 Comm: syz.4.939 Not tainted 6.1.148-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106
print_address_description mm/kasan/report.c:316 [inline]
print_report+0xa8/0x210 mm/kasan/report.c:420
kasan_report+0x10b/0x140 mm/kasan/report.c:524
rose_timer_expiry+0x470/0x490 net/rose/rose_timer.c:183
call_timer_fn+0x1a0/0x670 kernel/time/timer.c:1504
expire_timers kernel/time/timer.c:1549 [inline]
__run_timers+0x525/0x7c0 kernel/time/timer.c:1820
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1833
handle_softirqs+0x2a1/0x920 kernel/softirq.c:596
__do_softirq kernel/softirq.c:630 [inline]
invoke_softirq kernel/softirq.c:470 [inline]
__irq_exit_rcu+0x12f/0x220 kernel/softirq.c:679
irq_exit_rcu+0x5/0x20 kernel/softirq.c:691
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline]
sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1118
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x25/0x40 kernel/locking/spinlock.c:202
Code: f5 ff 0f 1f 00 53 48 89 fb 48 83 c7 18 48 8b 74 24 08 e8 fe f8 42 f7 48 89 df e8 56 be 43 f7 e8 61 b0 66 f7 fb bf 01 00 00 00 06 3c 37 f7 65 8b 05 57 05 e2 75 85 c0 74 02 5b c3 e8 a4 16 e0
RSP: 0018:ffffc900043472d8 EFLAGS: 00000286
RAX: 1ae33e5312f72100 RBX: ffff88807d3ee870 RCX: 1ae33e5312f72100
RDX: dffffc0000000000 RSI: ffffffff8a8c0420 RDI: 0000000000000001
RBP: ffffc90004347590 R08: dffffc0000000000 R09: fffffbfff215bc4a
R10: fffffbfff215bc4a R11: 1ffffffff215bc49 R12: dffffc0000000000
R13: 1ffff1100fa7dd0d R14: ffff88807d3ee868 R15: ffff88807d3ee870
spin_unlock_irq include/linux/spinlock.h:401 [inline]
filemap_remove_folio+0xf5/0x2c0 mm/filemap.c:256
truncate_inode_folio+0x59/0x70 mm/truncate.c:195
shmem_undo_range+0x4d2/0x2050 mm/shmem.c:942
shmem_truncate_range mm/shmem.c:1062 [inline]
shmem_evict_inode+0x248/0xa40 mm/shmem.c:1171
evict+0x485/0x870 fs/inode.c:705
__dentry_kill+0x431/0x650 fs/dcache.c:611
dentry_kill+0xb8/0x290 fs/dcache.c:-1
dput+0xfa/0x1d0 fs/dcache.c:918
__fput+0x5e0/0x920 fs/file_table.c:328
task_work_run+0x1ca/0x250 kernel/task_work.c:203
exit_task_work include/linux/task_work.h:39 [inline]
do_exit+0x93e/0x2400 kernel/exit.c:880
do_group_exit+0x217/0x2d0 kernel/exit.c:1022
get_signal+0x1272/0x1350 kernel/signal.c:2871
arch_do_signal_or_restart+0xb0/0x1230 arch/x86/kernel/signal.c:871
exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174
exit_to_user_mode_prepare+0xb1/0x140 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
RIP: 0033:0x7fc05298ebe9
Code: Unable to access opcode bytes at 0x7fc05298ebbf.
RSP: 002b:00007fc0538280e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: 0000000000000001 RBX: 00007fc052bb5fa8 RCX: 00007fc05298ebe9
RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007fc052bb5fac
RBP: 00007fc052bb5fa0 R08: 0019b011677929fe R09: 0000000000000000
R10: 0000000000000381 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc052bb6038 R14: 00007ffd9008a860 R15: 00007ffd9008a948
Allocated by task 7936:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:383
kasan_kmalloc include/linux/kasan.h:211 [inline]
__do_kmalloc_node mm/slab_common.c:936 [inline]
__kmalloc_node_track_caller+0xae/0x230 mm/slab_common.c:956
kmalloc_reserve net/core/skbuff.c:446 [inline]
__alloc_skb+0x22a/0x7e0 net/core/skbuff.c:515
__netdev_alloc_skb+0x107/0x4d0 net/core/skbuff.c:579
netdev_alloc_skb include/linux/skbuff.h:3229 [inline]
dev_alloc_skb include/linux/skbuff.h:3242 [inline]
__ieee80211_beacon_get+0xc48/0x1f50 net/mac80211/tx.c:5270
ieee80211_beacon_get_tim+0x5b/0x4d0 net/mac80211/tx.c:5352
ieee80211_beacon_get include/net/mac80211.h:5262 [inline]
mac80211_hwsim_beacon_tx+0x21c/0xae0 drivers/net/wireless/mac80211_hwsim.c:2091
__iterate_interfaces+0x243/0x500 net/mac80211/util.c:788
ieee80211_iterate_active_interfaces_atomic+0xd7/0x170 net/mac80211/util.c:824
mac80211_hwsim_beacon+0xb7/0x1b0 drivers/net/wireless/mac80211_hwsim.c:2147
__run_hrtimer kernel/time/hrtimer.c:1752 [inline]
__hrtimer_run_queues+0x554/0xd60 kernel/time/hrtimer.c:1816
hrtimer_run_softirq+0x183/0x2a0 kernel/time/hrtimer.c:1833
handle_softirqs+0x2a1/0x920 kernel/softirq.c:596
__do_softirq kernel/softirq.c:630 [inline]
invoke_softirq kernel/softirq.c:470 [inline]
__irq_exit_rcu+0x12f/0x220 kernel/softirq.c:679
irq_exit_rcu+0x5/0x20 kernel/softirq.c:691
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline]
sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1118
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691
Freed by task 7936:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x2d/0x50 mm/kasan/generic.c:516
____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1724 [inline]
slab_free_freelist_hook+0x131/0x1a0 mm/slub.c:1750
slab_free mm/slub.c:3661 [inline]
__kmem_cache_free+0xb6/0x1f0 mm/slub.c:3674
skb_free_head net/core/skbuff.c:762 [inline]
skb_release_data+0x5db/0x7c0 net/core/skbuff.c:791
skb_release_all net/core/skbuff.c:856 [inline]
__kfree_skb net/core/skbuff.c:870 [inline]
consume_skb+0xa2/0x100 net/core/skbuff.c:1035
mac80211_hwsim_beacon_tx+0x61e/0xae0 drivers/net/wireless/mac80211_hwsim.c:2121
__iterate_interfaces+0x243/0x500 net/mac80211/util.c:788
ieee80211_iterate_active_interfaces_atomic+0xd7/0x170 net/mac80211/util.c:824
mac80211_hwsim_beacon+0xb7/0x1b0 drivers/net/wireless/mac80211_hwsim.c:2147
__run_hrtimer kernel/time/hrtimer.c:1752 [inline]
__hrtimer_run_queues+0x554/0xd60 kernel/time/hrtimer.c:1816
hrtimer_run_softirq+0x183/0x2a0 kernel/time/hrtimer.c:1833
handle_softirqs+0x2a1/0x920 kernel/softirq.c:596
__do_softirq kernel/softirq.c:630 [inline]
invoke_softirq kernel/softirq.c:470 [inline]
__irq_exit_rcu+0x12f/0x220 kernel/softirq.c:679
irq_exit_rcu+0x5/0x20 kernel/softirq.c:691
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline]
sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1118
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691
The buggy address belongs to the object at ffff888071ec3800
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 42 bytes inside of
512-byte region [ffff888071ec3800, ffff888071ec3a00)
The buggy address belongs to the physical page:
page:ffffea0001c7b000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x71ec0
head:ffffea0001c7b000 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000001 ffff888017441c80
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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4336, tgid 4336 (kworker/0:7), ts 59961897997, free_ts 53721676749
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532
prep_new_page mm/page_alloc.c:2539 [inline]
get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328
__alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614
alloc_slab_page+0x5d/0x160 mm/slub.c:1794
allocate_slab mm/slub.c:1939 [inline]
new_slab+0x87/0x2c0 mm/slub.c:1992
___slab_alloc+0xbc6/0x1220 mm/slub.c:3180
__slab_alloc mm/slub.c:3279 [inline]
slab_alloc_node mm/slub.c:3364 [inline]
__kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3437
kmalloc_trace+0x26/0xe0 mm/slab_common.c:1026
kmalloc include/linux/slab.h:563 [inline]
kzalloc include/linux/slab.h:699 [inline]
mca_alloc net/ipv6/mcast.c:880 [inline]
__ipv6_dev_mc_inc+0x413/0xac0 net/ipv6/mcast.c:936
addrconf_join_solict net/ipv6/addrconf.c:2198 [inline]
addrconf_dad_begin net/ipv6/addrconf.c:4040 [inline]
addrconf_dad_work+0x3b9/0x14d0 net/ipv6/addrconf.c:4165
process_one_work+0x898/0x1160 kernel/workqueue.c:2292
worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1459 [inline]
free_pcp_prepare mm/page_alloc.c:1509 [inline]
free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384
free_unref_page_list+0xbb/0x8e0 mm/page_alloc.c:3525
release_pages+0x1f92/0x2200 mm/swap.c:1035
tlb_batch_pages_flush mm/mmu_gather.c:59 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:254 [inline]
tlb_flush_mmu+0xff/0x210 mm/mmu_gather.c:261
tlb_finish_mmu+0xbd/0x1c0 mm/mmu_gather.c:361
unmap_region+0x272/0x2c0 mm/mmap.c:2339
do_mas_align_munmap+0xc57/0x1220 mm/mmap.c:2588
do_mas_munmap+0x240/0x2b0 mm/mmap.c:2646
__vm_munmap+0x18d/0x290 mm/mmap.c:2932
__do_sys_munmap mm/mmap.c:2957 [inline]
__se_sys_munmap mm/mmap.c:2954 [inline]
__x64_sys_munmap+0x5c/0x70 mm/mmap.c:2954
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
Memory state around the buggy address:
ffff888071ec3700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888071ec3780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888071ec3800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888071ec3880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888071ec3900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess), 2 bytes skipped:
0: 0f 1f 00 nopl (%rax)
3: 53 push %rbx
4: 48 89 fb mov %rdi,%rbx
7: 48 83 c7 18 add $0x18,%rdi
b: 48 8b 74 24 08 mov 0x8(%rsp),%rsi
10: e8 fe f8 42 f7 call 0xf742f913
15: 48 89 df mov %rbx,%rdi
18: e8 56 be 43 f7 call 0xf743be73
1d: e8 61 b0 66 f7 call 0xf766b083
22: fb sti
23: bf 01 00 00 00 mov $0x1,%edi
* 28: e8 06 3c 37 f7 call 0xf7373c33 <-- trapping instruction
2d: 65 8b 05 57 05 e2 75 mov %gs:0x75e20557(%rip),%eax # 0x75e2058b
34: 85 c0 test %eax,%eax
36: 74 02 je 0x3a
38: 5b pop %rbx
39: c3 ret
3a: e8 .byte 0xe8
3b: a4 movsb %ds:(%rsi),%es:(%rdi)
3c: 16 (bad)
3d: e0 .byte 0xe0