==================================================================
BUG: KASAN: use-after-free in rose_timer_expiry+0x470/0x490 net/rose/rose_timer.c:183
Read of size 2 at addr ffff8880256c6c2a by task syz.3.553/6842
CPU: 0 PID: 6842 Comm: syz.3.553 Not tainted 5.15.189-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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+0x13b/0x200 kernel/softirq.c:477
__local_bh_enable_ip+0x174/0x1b0 kernel/softirq.c:401
init_conntrack+0xc88/0x14b0 net/netfilter/nf_conntrack_core.c:1754
resolve_normal_ct net/netfilter/nf_conntrack_core.c:1805 [inline]
nf_conntrack_in+0xce9/0x16f0 net/netfilter/nf_conntrack_core.c:1960
nf_hook_entry_hookfn include/linux/netfilter.h:142 [inline]
nf_hook_slow+0xb9/0x200 net/netfilter/core.c:584
nf_hook+0x1f2/0x350 include/linux/netfilter.h:257
__ip_local_out+0x4b7/0x5e0 net/ipv4/ip_output.c:115
ip_local_out net/ipv4/ip_output.c:124 [inline]
ip_send_skb+0x48/0x1c0 net/ipv4/ip_output.c:1581
udp_send_skb+0x94a/0x1330 net/ipv4/udp.c:991
udp_sendmsg+0x1aaa/0x2340 net/ipv4/udp.c:1279
sock_sendmsg_nosec net/socket.c:704 [inline]
__sock_sendmsg net/socket.c:716 [inline]
____sys_sendmsg+0x5a2/0x8c0 net/socket.c:2436
___sys_sendmsg+0x1f0/0x260 net/socket.c:2490
__sys_sendmmsg+0x27c/0x4a0 net/socket.c:2576
__do_sys_sendmmsg net/socket.c:2605 [inline]
__se_sys_sendmmsg net/socket.c:2602 [inline]
__x64_sys_sendmmsg+0x9c/0xb0 net/socket.c:2602
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:0x7fe316c35be9
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:00007fe314e9d038 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007fe316e5cfa0 RCX: 00007fe316c35be9
RDX: 0000000000000300 RSI: 0000200000004d00 RDI: 0000000000000003
RBP: 00007fe316cb8e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000f00 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fe316e5d038 R14: 00007fe316e5cfa0 R15: 00007ffe249cda68
Allocated by task 4996:
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 include/linux/slab.h:604 [inline]
rose_add_node+0x227/0xdb0 net/rose/rose_route.c:85
rose_rt_ioctl+0x9db/0xe20 net/rose/rose_route.c:738
rose_ioctl+0x27a/0x790 net/rose/af_rose.c:1372
sock_do_ioctl+0xd3/0x2f0 net/socket.c:1140
sock_ioctl+0x4ed/0x6e0 net/socket.c:1257
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860
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
Freed by task 6550:
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
rose_rt_device_down+0x4e2/0x530 net/rose/rose_route.c:515
rose_device_event+0x5ec/0x680 net/rose/af_rose.c:247
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]
dev_close_many+0x28d/0x400 net/core/dev.c:1650
dev_close+0x14c/0x200 net/core/dev.c:1672
bpq_device_event+0x2f4/0x9c0 drivers/net/hamradio/bpqether.c:548
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]
__dev_notify_flags+0x178/0x2d0 net/core/dev.c:-1
dev_change_flags+0xe3/0x1a0 net/core/dev.c:8929
dev_ifsioc+0x147/0xe70 net/core/dev_ioctl.c:324
dev_ioctl+0x55f/0xe50 net/core/dev_ioctl.c:587
sock_do_ioctl+0x222/0x2f0 net/socket.c:1154
sock_ioctl+0x4ed/0x6e0 net/socket.c:1257
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xfa/0x170 fs/ioctl.c:860
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
The buggy address belongs to the object at ffff8880256c6c00
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 42 bytes inside of
512-byte region [ffff8880256c6c00, ffff8880256c6e00)
The buggy address belongs to the page:
page:ffffea000095b100 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880256c7c00 pfn:0x256c4
head:ffffea000095b100 order:2 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea0001eb1508 ffffea0001860908 ffff888016841c80
raw: ffff8880256c7c00 0000000000100006 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 2345, ts 14681105949, free_ts 14381546838
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]
kmem_cache_alloc_trace+0x1a5/0x2a0 mm/slub.c:3245
kmalloc include/linux/slab.h:604 [inline]
kzalloc include/linux/slab.h:735 [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 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 mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
__kasan_slab_alloc+0xb3/0xd0 mm/kasan/common.c:467
kasan_slab_alloc include/linux/kasan.h:254 [inline]
slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
slab_alloc_node mm/slub.c:3220 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc+0x100/0x290 mm/slub.c:3233
radix_tree_node_alloc+0x197/0x3a0 lib/radix-tree.c:251
idr_get_free+0x2af/0xa60 lib/radix-tree.c:1504
idr_alloc_u32 lib/idr.c:46 [inline]
idr_alloc_cyclic+0x19e/0x530 lib/idr.c:125
__kernfs_new_node+0x120/0x680 fs/kernfs/dir.c:599
kernfs_new_node+0x148/0x250 fs/kernfs/dir.c:669
__kernfs_create_file+0x47/0x2e0 fs/kernfs/file.c:985
sysfs_add_file_mode_ns+0x2d4/0x3a0 fs/sysfs/file.c:317
sysfs_create_file_ns+0x127/0x1a0 fs/sysfs/file.c:343
usb_create_newid_files drivers/usb/core/driver.c:195 [inline]
usb_register_driver+0x301/0x3d0 drivers/usb/core/driver.c:1065
do_one_initcall+0x1ee/0x680 init/main.c:1302
Memory state around the buggy address:
ffff8880256c6b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880256c6b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880256c6c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880256c6c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880256c6d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================