==================================================================
BUG: KASAN: use-after-free in rose_timer_expiry+0x470/0x490 net/rose/rose_timer.c:183
Read of size 2 at addr ffff888059a85c2a by task syz.9.2119/15449
CPU: 0 PID: 15449 Comm: syz.9.2119 Not tainted 6.1.147-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/0x200 mm/kasan/report.c:418
kasan_report+0x10b/0x140 mm/kasan/report.c:522
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:lock_acquire+0x20f/0x490 kernel/locking/lockdep.c:5666
Code: 00 9c 8f 84 24 80 00 00 00 f6 84 24 81 00 00 00 02 0f 85 f5 00 00 00 41 f7 c6 00 02 00 00 74 01 fb 48 c7 44 24 60 0e 36 e0 45 <4b> c7 44 3d 00 00 00 00 00 66 43 c7 44 3d 09 00 00 43 c6 44 3d 0b
RSP: 0018:ffffc90003f770c0 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 0000000000000000 RCX: 1871a046533cf000
RDX: 0000000000000000 RSI: ffffffff8a8c15e0 RDI: ffffffff8adef320
RBP: ffffc90003f771c8 R08: dffffc0000000000 R09: fffffbfff215ba49
R10: fffffbfff215ba49 R11: 1ffffffff215ba48 R12: 0000000000000000
R13: 1ffff920007eee24 R14: 0000000000000246 R15: dffffc0000000000
rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
rcu_read_lock include/linux/rcupdate.h:791 [inline]
fib_lookup+0x96/0x440 include/net/ip_fib.h:379
ip_route_output_key_hash_rcu+0x301/0x23a0 net/ipv4/route.c:2781
ip_route_output_key_hash+0x207/0x340 net/ipv4/route.c:2671
__ip_route_output_key include/net/route.h:137 [inline]
ip_route_output_flow+0x26/0x150 net/ipv4/route.c:2901
ip_route_output_key include/net/route.h:153 [inline]
sctp_v4_get_dst+0xbbf/0x1170 net/sctp/protocol.c:504
sctp_transport_route+0x107/0x2b0 net/sctp/transport.c:457
sctp_packet_config+0x456/0xd20 net/sctp/output.c:103
sctp_packet_singleton+0x155/0x330 net/sctp/outqueue.c:777
sctp_outq_flush_ctrl net/sctp/outqueue.c:914 [inline]
sctp_outq_flush+0x48f/0x3100 net/sctp/outqueue.c:1212
sctp_cmd_interpreter net/sctp/sm_sideeffect.c:-1 [inline]
sctp_side_effects net/sctp/sm_sideeffect.c:1199 [inline]
sctp_do_sm+0x4e61/0x5500 net/sctp/sm_sideeffect.c:1170
sctp_primitive_ASSOCIATE+0x91/0xc0 net/sctp/primitive.c:73
__sctp_connect+0x92b/0xd20 net/sctp/socket.c:1233
__sctp_setsockopt_connectx net/sctp/socket.c:1335 [inline]
sctp_getsockopt_connectx3+0x2c0/0x440 net/sctp/socket.c:1420
sctp_getsockopt+0x3ab/0x8a0 net/sctp/socket.c:8126
__sys_getsockopt+0x1b0/0x230 net/socket.c:2332
__do_sys_getsockopt net/socket.c:2347 [inline]
__se_sys_getsockopt net/socket.c:2344 [inline]
__x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2344
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
RIP: 0033:0x7fe21038ebe9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe21119a038 EFLAGS: 00000246 ORIG_RAX: 0000000000000037
RAX: ffffffffffffffda RBX: 00007fe2105b6180 RCX: 00007fe21038ebe9
RDX: 000000000000006f RSI: 0000000000000084 RDI: 0000000000000009
RBP: 00007fe210411e19 R08: 0000200000000180 R09: 0000000000000000
R10: 0000200000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fe2105b6218 R14: 00007fe2105b6180 R15: 00007ffc58011d28
Allocated by task 4607:
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:3206 [inline]
dev_alloc_skb include/linux/skbuff.h:3219 [inline]
__ieee80211_beacon_get+0xc48/0x1f50 net/mac80211/tx.c:5260
ieee80211_beacon_get_tim+0x5b/0x4d0 net/mac80211/tx.c:5342
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 4607:
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
Last potentially related work creation:
kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486
insert_work+0x54/0x3c0 kernel/workqueue.c:1361
__queue_work+0xba3/0xfb0 kernel/workqueue.c:1520
call_timer_fn+0x1a0/0x670 kernel/time/timer.c:1504
expire_timers kernel/time/timer.c:1544 [inline]
__run_timers+0x550/0x7c0 kernel/time/timer.c:1820
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1833
handle_softirqs+0x2a1/0x920 kernel/softirq.c:596
run_ksoftirqd+0x98/0xf0 kernel/softirq.c:963
smpboot_thread_fn+0x64a/0xa40 kernel/smpboot.c:164
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Second to last potentially related work creation:
kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486
kvfree_call_rcu+0x108/0x870 kernel/rcu/tree.c:3405
drop_sysctl_table+0x2fa/0x430 fs/proc/proc_sysctl.c:1731
drop_sysctl_table+0x2e9/0x430 fs/proc/proc_sysctl.c:1734
unregister_sysctl_table+0x85/0x130 fs/proc/proc_sysctl.c:1769
neigh_sysctl_unregister+0x74/0x90 net/core/neighbour.c:3871
devinet_sysctl_unregister net/ipv4/devinet.c:2665 [inline]
inetdev_destroy net/ipv4/devinet.c:329 [inline]
inetdev_event+0x733/0x1410 net/ipv4/devinet.c:1616
notifier_call_chain kernel/notifier.c:87 [inline]
raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:455
call_netdevice_notifiers_extack net/core/dev.c:2039 [inline]
call_netdevice_notifiers net/core/dev.c:2053 [inline]
unregister_netdevice_many+0xfdc/0x1840 net/core/dev.c:10978
default_device_exit_batch+0x9c3/0xa50 net/core/dev.c:11491
ops_exit_list net/core/net_namespace.c:177 [inline]
cleanup_net+0x77b/0xb80 net/core/net_namespace.c:640
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
The buggy address belongs to the object at ffff888059a85c00
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 42 bytes inside of
512-byte region [ffff888059a85c00, ffff888059a85e00)
The buggy address belongs to the physical page:
page:ffffea000166a100 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888059a85000 pfn:0x59a84
head:ffffea000166a100 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea0000c37008 ffffea0000a50e08 ffff888017441c80
raw: ffff888059a85000 0000000000100005 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 4277, tgid 4277 (syz-executor), ts 63361956179, free_ts 12547609953
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
__do_kmalloc_node mm/slab_common.c:935 [inline]
__kmalloc_node_track_caller+0x9e/0x230 mm/slab_common.c:956
kmalloc_reserve net/core/skbuff.c:446 [inline]
__alloc_skb+0x22a/0x7e0 net/core/skbuff.c:515
alloc_skb include/linux/skbuff.h:1271 [inline]
nlmsg_new include/net/netlink.h:991 [inline]
netlink_ack+0x372/0x1100 net/netlink/af_netlink.c:2448
netlink_rcv_skb+0x263/0x420 net/netlink/af_netlink.c:2517
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x74d/0x8d0 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x89e/0xbc0 net/netlink/af_netlink.c:1872
sock_sendmsg_nosec net/socket.c:718 [inline]
__sock_sendmsg net/socket.c:730 [inline]
__sys_sendto+0x44f/0x5c0 net/socket.c:2153
__do_sys_sendto net/socket.c:2165 [inline]
__se_sys_sendto net/socket.c:2161 [inline]
__x64_sys_sendto+0xda/0xf0 net/socket.c:2161
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
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+0x2e/0x3f0 mm/page_alloc.c:3479
free_contig_range+0x9d/0x150 mm/page_alloc.c:9574
destroy_args+0xef/0x8bf mm/debug_vm_pgtable.c:1031
debug_vm_pgtable+0x32a/0x37e mm/debug_vm_pgtable.c:1354
do_one_initcall+0x214/0x7a0 init/main.c:1298
do_initcall_level+0x137/0x1e4 init/main.c:1371
do_initcalls+0x4b/0x8a init/main.c:1387
kernel_init_freeable+0x3fa/0x5ac init/main.c:1626
kernel_init+0x19/0x1b0 init/main.c:1514
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Memory state around the buggy address:
ffff888059a85b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888059a85b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888059a85c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888059a85c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888059a85d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 00 9c 8f 84 24 80 00 add %bl,0x802484(%rdi,%rcx,4)
7: 00 00 add %al,(%rax)
9: f6 84 24 81 00 00 00 testb $0x2,0x81(%rsp)
10: 02
11: 0f 85 f5 00 00 00 jne 0x10c
17: 41 f7 c6 00 02 00 00 test $0x200,%r14d
1e: 74 01 je 0x21
20: fb sti
21: 48 c7 44 24 60 0e 36 movq $0x45e0360e,0x60(%rsp)
28: e0 45
* 2a: 4b c7 44 3d 00 00 00 movq $0x0,0x0(%r13,%r15,1) <-- trapping instruction
31: 00 00
33: 66 43 c7 44 3d 09 00 movw $0x0,0x9(%r13,%r15,1)
3a: 00
3b: 43 rex.XB
3c: c6 .byte 0xc6
3d: 44 rex.R
3e: 3d .byte 0x3d
3f: 0b .byte 0xb