================================================================== BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x471/0x4b0 net/rose/rose_timer.c:183 Read of size 2 at addr ffff88814570802a by task syz.3.2634/12915 CPU: 1 UID: 0 PID: 12915 Comm: syz.3.2634 Not tainted 6.15.0-rc5-syzkaller-00126-gea9a83d7f371 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/29/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xb4/0x290 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 rose_timer_expiry+0x471/0x4b0 net/rose/rose_timer.c:183 call_timer_fn+0x17b/0x5f0 kernel/time/timer.c:1789 expire_timers kernel/time/timer.c:1840 [inline] __run_timers kernel/time/timer.c:2414 [inline] __run_timer_base+0x61a/0x860 kernel/time/timer.c:2426 run_timer_base kernel/time/timer.c:2435 [inline] run_timer_softirq+0xb7/0x180 kernel/time/timer.c:2445 handle_softirqs+0x283/0x870 kernel/softirq.c:579 __do_softirq kernel/softirq.c:613 [inline] invoke_softirq kernel/softirq.c:453 [inline] __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680 irq_exit_rcu+0x9/0x30 kernel/softirq.c:696 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0x57/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0033:0x7f49d5467d94 Code: 84 00 00 00 00 00 48 8b 4b 08 48 83 c3 08 48 39 d1 72 f3 48 83 e8 08 48 39 f2 73 17 66 2e 0f 1f 84 00 00 00 00 00 48 8b 70 f8 <48> 83 e8 08 48 39 f2 72 f3 48 39 c3 73 3e 48 89 33 48 83 c3 08 48 RSP: 002b:00007ffe293911b0 EFLAGS: 00000283 RAX: 00007f49d4c9f9e8 RBX: 00007f49d4c9a820 RCX: ffffffff895c8238 RDX: ffffffff894666e1 RSI: ffffffff8947262d RDI: 00007f49d4cb75c8 RBP: 00007f49d4c80f38 R08: 00007f49d4c9c278 R09: 00007f49d57a2000 R10: 00007f49d4bff008 R11: 0000000000000001 R12: 00007f49d4c80f30 R13: 000000000000001d R14: 00007ffe29391338 R15: 00007f49d4bff008 Allocated by task 5960: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x230/0x3d0 mm/slub.c:4358 kmalloc_noprof include/linux/slab.h:905 [inline] rose_add_node+0x23a/0xde0 net/rose/rose_route.c:85 rose_rt_ioctl+0xa48/0xfb0 net/rose/rose_route.c:747 rose_ioctl+0x3ce/0x8b0 net/rose/af_rose.c:1380 sock_do_ioctl+0xd9/0x300 net/socket.c:1190 sock_ioctl+0x576/0x790 net/socket.c:1311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 7178: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2380 [inline] slab_free mm/slub.c:4642 [inline] kfree+0x193/0x440 mm/slub.c:4841 rose_rt_device_down+0x66d/0x6c0 net/rose/rose_route.c:522 rose_device_event+0x603/0x6a0 net/rose/af_rose.c:248 notifier_call_chain+0x1b3/0x3e0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2214 [inline] call_netdevice_notifiers net/core/dev.c:2228 [inline] __dev_notify_flags+0x18d/0x2e0 net/core/dev.c:-1 netif_change_flags+0xe8/0x1a0 net/core/dev.c:9422 dev_change_flags+0x130/0x260 net/core/dev_api.c:68 dev_ioctl+0x7b4/0x1150 net/core/dev_ioctl.c:821 sock_do_ioctl+0x22c/0x300 net/socket.c:1204 sock_ioctl+0x576/0x790 net/socket.c:1311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xf6/0x210 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888145708000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 42 bytes inside of freed 512-byte region [ffff888145708000, ffff888145708200) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888145708000 pfn:0x145708 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x57ff00000000240(workingset|head|node=1|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 057ff00000000240 ffff88801a041c80 ffffea000515c410 ffffea000514fc10 raw: ffff888145708000 000000000010000b 00000000f5000000 0000000000000000 head: 057ff00000000240 ffff88801a041c80 ffffea000515c410 ffffea000514fc10 head: ffff888145708000 000000000010000b 00000000f5000000 0000000000000000 head: 057ff00000000002 ffffea000515c201 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd2000(__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 15315029030, free_ts 15106854067 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1d8/0x230 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x21ce/0x22b0 mm/page_alloc.c:3688 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4970 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2450 [inline] allocate_slab+0x8a/0x3b0 mm/slub.c:2618 new_slab mm/slub.c:2672 [inline] ___slab_alloc+0xbfc/0x1480 mm/slub.c:3858 __slab_alloc mm/slub.c:3948 [inline] __slab_alloc_node mm/slub.c:4023 [inline] slab_alloc_node mm/slub.c:4184 [inline] __kmalloc_cache_noprof+0x296/0x3d0 mm/slub.c:4353 kmalloc_noprof include/linux/slab.h:905 [inline] usb_cache_string+0x66/0x130 drivers/usb/core/message.c:1028 usb_enumerate_device drivers/usb/core/hub.c:2506 [inline] usb_new_device+0x2fe/0x16c0 drivers/usb/core/hub.c:2633 register_root_hub+0x275/0x590 drivers/usb/core/hcd.c:994 usb_add_hcd+0xba1/0x1050 drivers/usb/core/hcd.c:2976 vhci_hcd_probe+0x144/0x380 drivers/usb/usbip/vhci_hcd.c:1363 platform_probe+0x145/0x1d0 drivers/base/platform.c:1404 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26a/0x9a0 drivers/base/dd.c:657 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:799 driver_probe_device+0x4f/0x430 drivers/base/dd.c:829 page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0xb0e/0xcd0 mm/page_alloc.c:2725 stack_depot_save_flags+0x447/0x910 lib/stackdepot.c:678 kasan_save_stack mm/kasan/common.c:48 [inline] kasan_save_track+0x4f/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4147 [inline] slab_alloc_node mm/slub.c:4196 [inline] kmem_cache_alloc_noprof+0x1c1/0x3c0 mm/slub.c:4203 __kernfs_new_node+0xd7/0x7f0 fs/kernfs/dir.c:637 kernfs_new_node+0x102/0x210 fs/kernfs/dir.c:713 __kernfs_create_file+0x4b/0x2e0 fs/kernfs/file.c:1038 sysfs_add_file_mode_ns+0x238/0x300 fs/sysfs/file.c:319 sysfs_create_file_ns+0x128/0x1a0 fs/sysfs/file.c:386 device_add+0x440/0xb50 drivers/base/core.c:3639 usb_create_ep_devs+0x12c/0x230 drivers/usb/core/endpoint.c:170 create_intf_ep_devs drivers/usb/core/message.c:1252 [inline] usb_set_configuration+0x1bc7/0x20e0 drivers/usb/core/message.c:2216 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250 usb_probe_device+0x1c1/0x390 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26a/0x9a0 drivers/base/dd.c:657 Memory state around the buggy address: ffff888145707f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888145707f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888145708000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888145708080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888145708100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================