==================================================================
BUG: KASAN: use-after-free in rose_timer_expiry+0x470/0x490 net/rose/rose_timer.c:183
Read of size 2 at addr ffff8880221ff02a by task kworker/0:1H/150
CPU: 0 PID: 150 Comm: kworker/0:1H Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Workqueue: events_highpri snd_vmidi_output_work
Call Trace:
dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
print_address_description+0x60/0x2d0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0xdf/0x130 mm/kasan/report.c:451
rose_timer_expiry+0x470/0x490 net/rose/rose_timer.c:183
call_timer_fn+0x16c/0x530 kernel/time/timer.c:1451
expire_timers kernel/time/timer.c:1496 [inline]
__run_timers+0x525/0x7c0 kernel/time/timer.c:1767
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1780
handle_softirqs+0x328/0x820 kernel/softirq.c:576
__do_softirq kernel/softirq.c:610 [inline]
invoke_softirq kernel/softirq.c:450 [inline]
__irq_exit_rcu+0x12f/0x220 kernel/softirq.c:659
irq_exit_rcu+0x5/0x20 kernel/softirq.c:671
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline]
sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
RIP: 0010:finish_lock_switch+0x134/0x280 kernel/sched/core.c:4804
Code: be ff ff ff ff e8 7c fc 55 08 85 c0 74 4a 4d 85 ff 75 66 e9 fe 00 00 00 48 89 df e8 76 67 5f 08 e8 11 76 2a 00 fb 48 83 c4 08 <5b> 41 5c 41 5d 41 5e 41 5f 5d c3 48 89 df e8 d9 0f fe ff 43 80 3c
RSP: 0018:ffffc9000182f6c8 EFLAGS: 00000282
RAX: c934dff363b6a500 RBX: ffff8880b903a340 RCX: c934dff363b6a500
RDX: dffffc0000000000 RSI: ffffffff8a0b1c60 RDI: ffffffff8a59e580
RBP: 1ffff11017207613 R08: dffffc0000000000 R09: fffffbfff1ff7c44
R10: fffffbfff1ff7c44 R11: 1ffffffff1ff7c43 R12: ffff8880b903b088
R13: dffffc0000000000 R14: ffff8880b903ae08 R15: 0000000000000000
finish_task_switch+0x12f/0x640 kernel/sched/core.c:4921
context_switch kernel/sched/core.c:5052 [inline]
__schedule+0x11c3/0x4390 kernel/sched/core.c:6395
preempt_schedule_common+0x82/0xd0 kernel/sched/core.c:6571
preempt_schedule+0xa7/0xb0 kernel/sched/core.c:6596
preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:34
__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline]
_raw_spin_unlock_irqrestore+0xf6/0x100 kernel/locking/spinlock.c:194
spin_unlock_irqrestore include/linux/spinlock.h:419 [inline]
snd_rawmidi_transmit+0x349/0x400 sound/core/rawmidi.c:1417
snd_vmidi_output_work+0x1a0/0x400 sound/core/seq/seq_virmidi.c:151
process_one_work+0x863/0x1000 kernel/workqueue.c:2310
worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457
kthread+0x436/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
Allocated by task 0:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
____kasan_kmalloc mm/kasan/common.c:513 [inline]
__kasan_kmalloc+0xb5/0xf0 mm/kasan/common.c:522
kmalloc_reserve net/core/skbuff.c:356 [inline]
__alloc_skb+0x22c/0x750 net/core/skbuff.c:427
skb_copy+0x139/0x790 net/core/skbuff.c:1595
mac80211_hwsim_tx_frame_no_nl+0xcc7/0x15d0 drivers/net/wireless/mac80211_hwsim.c:1569
mac80211_hwsim_tx_frame+0x1b5/0x200 drivers/net/wireless/mac80211_hwsim.c:1788
mac80211_hwsim_beacon_tx+0x4f3/0x920 drivers/net/wireless/mac80211_hwsim.c:1842
__iterate_interfaces+0x243/0x500 net/mac80211/util.c:793
ieee80211_iterate_active_interfaces_atomic+0xb3/0x140 net/mac80211/util.c:829
mac80211_hwsim_beacon+0x9b/0x180 drivers/net/wireless/mac80211_hwsim.c:1865
__run_hrtimer kernel/time/hrtimer.c:1685 [inline]
__hrtimer_run_queues+0x53d/0xc40 kernel/time/hrtimer.c:1749
hrtimer_run_softirq+0x176/0x240 kernel/time/hrtimer.c:1766
handle_softirqs+0x328/0x820 kernel/softirq.c:576
__do_softirq kernel/softirq.c:610 [inline]
invoke_softirq kernel/softirq.c:450 [inline]
__irq_exit_rcu+0x12f/0x220 kernel/softirq.c:659
irq_exit_rcu+0x5/0x20 kernel/softirq.c:671
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline]
sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
Freed by task 144:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:46
kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366
kasan_slab_free include/linux/kasan.h:230 [inline]
slab_free_hook mm/slub.c:1710 [inline]
slab_free_freelist_hook+0xea/0x170 mm/slub.c:1736
slab_free mm/slub.c:3504 [inline]
kfree+0xef/0x2a0 mm/slub.c:4564
skb_free_head net/core/skbuff.c:655 [inline]
skb_release_data+0x6fe/0x850 net/core/skbuff.c:677
skb_release_all net/core/skbuff.c:742 [inline]
__kfree_skb net/core/skbuff.c:756 [inline]
kfree_skb_reason+0xaf/0x110 net/core/skbuff.c:776
kfree_skb include/linux/skbuff.h:1118 [inline]
ieee80211_iface_work+0x798/0xc60 net/mac80211/iface.c:1515
process_one_work+0x863/0x1000 kernel/workqueue.c:2310
worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457
kthread+0x436/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
The buggy address belongs to the object at ffff8880221ff000
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 42 bytes inside of
512-byte region [ffff8880221ff000, ffff8880221ff200)
The buggy address belongs to the page:
page:ffffea0000887f00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880221fe800 pfn:0x221fc
head:ffffea0000887f00 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea00018f8a08 ffffea00018c7508 ffff888016841c80
raw: ffff8880221fe800 000000000010000f 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 1169, ts 6446105989, free_ts 0
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192
__alloc_pages+0x1e1/0x470 mm/page_alloc.c:5487
alloc_slab_page mm/slub.c:1780 [inline]
allocate_slab mm/slub.c:1917 [inline]
new_slab+0xc0/0x4b0 mm/slub.c:1980
___slab_alloc+0x81e/0xdf0 mm/slub.c:3013
__slab_alloc mm/slub.c:3100 [inline]
slab_alloc_node mm/slub.c:3191 [inline]
slab_alloc mm/slub.c:3233 [inline]
kmem_cache_alloc_trace+0x1a5/0x2a0 mm/slub.c:3250
kmalloc include/linux/slab.h:607 [inline]
kzalloc include/linux/slab.h:738 [inline]
alloc_bprm+0x56/0x6a0 fs/exec.c:1516
kernel_execve+0x49/0x900 fs/exec.c:1978
call_usermodehelper_exec_async+0x207/0x350 kernel/umh.c:112
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
page_owner free stack trace missing
Memory state around the buggy address:
ffff8880221fef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880221fef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880221ff000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880221ff080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880221ff100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: be ff ff ff ff mov $0xffffffff,%esi
5: e8 7c fc 55 08 call 0x855fc86
a: 85 c0 test %eax,%eax
c: 74 4a je 0x58
e: 4d 85 ff test %r15,%r15
11: 75 66 jne 0x79
13: e9 fe 00 00 00 jmp 0x116
18: 48 89 df mov %rbx,%rdi
1b: e8 76 67 5f 08 call 0x85f6796
20: e8 11 76 2a 00 call 0x2a7636
25: fb sti
26: 48 83 c4 08 add $0x8,%rsp
* 2a: 5b pop %rbx <-- trapping instruction
2b: 41 5c pop %r12
2d: 41 5d pop %r13
2f: 41 5e pop %r14
31: 41 5f pop %r15
33: 5d pop %rbp
34: c3 ret
35: 48 89 df mov %rbx,%rdi
38: e8 d9 0f fe ff call 0xfffe1016
3d: 43 rex.XB
3e: 80 .byte 0x80
3f: 3c .byte 0x3c