==================================================================
BUG: KASAN: use-after-free in rose_timer_expiry+0x470/0x490 net/rose/rose_timer.c:183
Read of size 2 at addr ffff888061b3402a by task syz.4.3931/17233
CPU: 0 PID: 17233 Comm: syz.4.3931 Not tainted 5.15.185-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
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:mod_objcg_state+0x32c/0x5f0 mm/memcontrol.c:3131
Code: fb 01 00 00 41 c7 04 24 00 00 00 00 85 c9 74 2a 48 8b 7c 24 18 48 8b 74 24 28 8b 54 24 24 e8 3b 06 00 00 eb 15 42 0f b6 04 3b <84> c0 0f 85 af 01 00 00 8b 44 24 20 41 89 04 24 65 8b 05 25 b0 40
RSP: 0018:ffffc90002eff820 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 1ffff11017206c8f RCX: 0000000000000000
RDX: 0000000000000006 RSI: ffff88813fffb000 RDI: ffffffff8a59a6e0
RBP: ffffc90002eff920 R08: dffffc0000000000 R09: fffffbfff1ad157e
R10: fffffbfff1ad157e R11: 1ffffffff1ad157d R12: ffff8880b9036478
R13: ffff8880b9036460 R14: 1ffff920005dff0c R15: dffffc0000000000
memcg_slab_post_alloc_hook mm/slab.h:322 [inline]
slab_post_alloc_hook+0x2aa/0x380 mm/slab.h:526
slab_alloc_node mm/slub.c:3220 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc_trace+0x103/0x2a0 mm/slub.c:3245
kmalloc include/linux/slab.h:604 [inline]
kzalloc include/linux/slab.h:735 [inline]
get_undo_list ipc/sem.c:1858 [inline]
copy_semundo+0xb2/0x230 ipc/sem.c:2317
copy_process+0x1655/0x3e00 kernel/fork.c:2275
kernel_clone+0x219/0x930 kernel/fork.c:2679
__do_sys_clone3 kernel/fork.c:2954 [inline]
__se_sys_clone3+0x2d5/0x360 kernel/fork.c:2938
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f4d24cd0189
Code: c1 08 00 48 8d 3d 7c c1 08 00 e8 02 29 f6 ff 66 90 b8 ea ff ff ff 48 85 ff 74 2c 48 85 d2 74 27 49 89 c8 b8 b3 01 00 00 0f 05 <48> 85 c0 7c 18 74 01 c3 31 ed 48 83 e4 f0 4c 89 c7 ff d2 48 89 c7
RSP: 002b:00007ffdfbaa6918 EFLAGS: 00000206 ORIG_RAX: 00000000000001b3
RAX: ffffffffffffffda RBX: 00007f4d24c52590 RCX: 00007f4d24cd0189
RDX: 00007f4d24c52590 RSI: 0000000000000058 RDI: 00007ffdfbaa6960
RBP: 00007f4d22b036c0 R08: 00007f4d22b036c0 R09: 00007ffdfbaa6a47
R10: 0000000000000008 R11: 0000000000000206 R12: ffffffffffffffa8
R13: 000000000000000b R14: 00007ffdfbaa6960 R15: 00007ffdfbaa6a48
Allocated by task 150:
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
__netdev_alloc_skb+0x103/0x4a0 net/core/skbuff.c:494
netdev_alloc_skb include/linux/skbuff.h:3001 [inline]
dev_alloc_skb include/linux/skbuff.h:3014 [inline]
__ieee80211_beacon_get+0xa73/0x1f80 net/mac80211/tx.c:5080
ieee80211_beacon_get_tim+0x48/0x840 net/mac80211/tx.c:5194
ieee80211_beacon_get include/net/mac80211.h:4981 [inline]
mac80211_hwsim_beacon_tx+0xf4/0x920 drivers/net/wireless/mac80211_hwsim.c:1812
__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:1690 [inline]
__hrtimer_run_queues+0x53d/0xc40 kernel/time/hrtimer.c:1754
hrtimer_run_softirq+0x176/0x240 kernel/time/hrtimer.c:1771
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 150:
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:1705 [inline]
slab_free_freelist_hook+0xea/0x170 mm/slub.c:1731
slab_free mm/slub.c:3499 [inline]
kfree+0xef/0x2a0 mm/slub.c:4559
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]
consume_skb+0xa2/0x100 net/core/skbuff.c:914
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:1690 [inline]
__hrtimer_run_queues+0x53d/0xc40 kernel/time/hrtimer.c:1754
hrtimer_run_softirq+0x176/0x240 kernel/time/hrtimer.c:1771
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
Last potentially related work creation:
kasan_save_stack+0x35/0x60 mm/kasan/common.c:38
kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348
kvfree_call_rcu+0x10a/0x7c0 kernel/rcu/tree.c:3596
drop_sysctl_table+0x2fa/0x430 fs/proc/proc_sysctl.c:1681
drop_sysctl_table+0x2e9/0x430 fs/proc/proc_sysctl.c:1684
unregister_sysctl_table+0x87/0x130 fs/proc/proc_sysctl.c:1719
neigh_sysctl_unregister+0x74/0x90 net/core/neighbour.c:3737
devinet_sysctl_unregister net/ipv4/devinet.c:2656 [inline]
inetdev_destroy net/ipv4/devinet.c:326 [inline]
inetdev_event+0x74b/0x1360 net/ipv4/devinet.c:1612
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391
call_netdevice_notifiers_extack net/core/dev.c:2061 [inline]
call_netdevice_notifiers net/core/dev.c:2075 [inline]
unregister_netdevice_many+0xf57/0x18f0 net/core/dev.c:11134
default_device_exit_batch+0x336/0x390 net/core/dev.c:11667
ops_exit_list net/core/net_namespace.c:177 [inline]
cleanup_net+0x77b/0xb80 net/core/net_namespace.c:635
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 ffff888061b34000
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 42 bytes inside of
512-byte region [ffff888061b34000, ffff888061b34200)
The buggy address belongs to the page:
page:ffffea000186cd00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x61b34
head:ffffea000186cd00 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888016841c80
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 4170, ts 54620368439, free_ts 54603912096
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:5474
alloc_slab_page mm/slub.c:1775 [inline]
allocate_slab mm/slub.c:1912 [inline]
new_slab+0xc0/0x4b0 mm/slub.c:1975
___slab_alloc+0x81e/0xdf0 mm/slub.c:3008
__slab_alloc mm/slub.c:3095 [inline]
slab_alloc_node mm/slub.c:3186 [inline]
slab_alloc mm/slub.c:3228 [inline]
__kmalloc+0x1cd/0x330 mm/slub.c:4403
kmalloc include/linux/slab.h:609 [inline]
kzalloc include/linux/slab.h:735 [inline]
new_dir fs/proc/proc_sysctl.c:955 [inline]
get_subdir fs/proc/proc_sysctl.c:1000 [inline]
__register_sysctl_table+0xa1f/0x1230 fs/proc/proc_sysctl.c:1349
neigh_sysctl_register+0x9a1/0xa80 net/core/neighbour.c:3718
devinet_sysctl_register+0xa8/0x1f0 net/ipv4/devinet.c:2641
inetdev_init+0x28c/0x4d0 net/ipv4/devinet.c:277
inetdev_event+0x280/0x1360 net/ipv4/devinet.c:1544
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391
call_netdevice_notifiers_extack net/core/dev.c:2061 [inline]
call_netdevice_notifiers net/core/dev.c:2075 [inline]
register_netdevice+0x1275/0x16b0 net/core/dev.c:10428
veth_newlink+0x668/0xda0 drivers/net/veth.c:1683
__rtnl_newlink net/core/rtnetlink.c:3524 [inline]
rtnl_newlink+0x114c/0x17d0 net/core/rtnetlink.c:3572
rtnetlink_rcv_msg+0x9b9/0xe60 net/core/rtnetlink.c:5650
netlink_rcv_skb+0x1e0/0x430 net/netlink/af_netlink.c:2489
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1340 [inline]
free_pcp_prepare mm/page_alloc.c:1391 [inline]
free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317
free_unref_page+0x94/0x280 mm/page_alloc.c:3396
stack_depot_save+0x418/0x440 lib/stackdepot.c:335
kasan_save_stack mm/kasan/common.c:40 [inline]
kasan_set_track+0x62/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:1705 [inline]
slab_free_freelist_hook+0xea/0x170 mm/slub.c:1731
slab_free mm/slub.c:3499 [inline]
kfree+0xef/0x2a0 mm/slub.c:4559
skb_free_head net/core/skbuff.c:655 [inline]
pskb_expand_head+0x358/0x10f0 net/core/skbuff.c:1742
netlink_trim+0x180/0x220 net/netlink/af_netlink.c:1293
netlink_broadcast_filtered+0x7c/0x1170 net/netlink/af_netlink.c:1498
netlink_broadcast net/netlink/af_netlink.c:1543 [inline]
nlmsg_multicast include/net/netlink.h:1033 [inline]
nlmsg_notify+0xec/0x1a0 net/netlink/af_netlink.c:2532
rtnl_notify net/core/rtnetlink.c:759 [inline]
rtmsg_ifinfo_send net/core/rtnetlink.c:3908 [inline]
rtmsg_ifinfo_event net/core/rtnetlink.c:3923 [inline]
rtnetlink_event+0x13a/0x1a0 net/core/rtnetlink.c:5701
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391
netdev_lower_state_changed+0xc3/0x130 net/core/dev.c:8606
team_lower_state_changed drivers/net/team/team.c:89 [inline]
team_refresh_port_linkup drivers/net/team/team.c:99 [inline]
__team_port_change_send+0x1c9/0x4e0 drivers/net/team/team.c:2946
Memory state around the buggy address:
ffff888061b33f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888061b33f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888061b34000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888061b34080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888061b34100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: fb sti
1: 01 00 add %eax,(%rax)
3: 00 41 c7 add %al,-0x39(%rcx)
6: 04 24 add $0x24,%al
8: 00 00 add %al,(%rax)
a: 00 00 add %al,(%rax)
c: 85 c9 test %ecx,%ecx
e: 74 2a je 0x3a
10: 48 8b 7c 24 18 mov 0x18(%rsp),%rdi
15: 48 8b 74 24 28 mov 0x28(%rsp),%rsi
1a: 8b 54 24 24 mov 0x24(%rsp),%edx
1e: e8 3b 06 00 00 call 0x65e
23: eb 15 jmp 0x3a
25: 42 0f b6 04 3b movzbl (%rbx,%r15,1),%eax
* 2a: 84 c0 test %al,%al <-- trapping instruction
2c: 0f 85 af 01 00 00 jne 0x1e1
32: 8b 44 24 20 mov 0x20(%rsp),%eax
36: 41 89 04 24 mov %eax,(%r12)
3a: 65 gs
3b: 8b .byte 0x8b
3c: 05 .byte 0x5
3d: 25 .byte 0x25
3e: b0 40 mov $0x40,%al