================================================================== BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x471/0x4b0 net/rose/rose_timer.c:183 Read of size 2 at addr ffff88805880c82a by task syz.2.6174/27126 CPU: 0 UID: 0 PID: 27126 Comm: syz.2.6174 Not tainted 6.17.0-rc1-next-20250812-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 rose_timer_expiry+0x471/0x4b0 net/rose/rose_timer.c:183 call_timer_fn+0x17e/0x5f0 kernel/time/timer.c:1747 expire_timers kernel/time/timer.c:1798 [inline] __run_timers kernel/time/timer.c:2372 [inline] __run_timer_base+0x61a/0x860 kernel/time/timer.c:2384 run_timer_base kernel/time/timer.c:2393 [inline] run_timer_softirq+0xb7/0x180 kernel/time/timer.c:2403 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:1050 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1050 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:page_table_check_set+0x431/0x730 mm/page_table_check.c:113 Code: 99 e8 a3 c6 f4 ff 48 03 2d bc 20 c8 17 eb 10 e8 d5 5e 91 ff 48 89 df e8 cd e0 ff ff 48 89 c5 4c 89 e7 4c 89 fe e8 1f 61 91 ff <48> 85 ed 74 54 4d 39 fc 73 4f e8 b0 5e 91 ff 49 ff c4 e9 72 fe ff RSP: 0018:ffffc900038d7348 EFLAGS: 00000297 RAX: ffffffff822e9d81 RBX: 000000000008619f RCX: ffff88802a500000 RDX: 0000000000000002 RSI: 0000000000000001 RDI: 0000000000000001 RBP: ffff88801ede81b0 R08: ffff88801ede81af R09: 1ffff11003dbd035 R10: dffffc0000000000 R11: ffffed1003dbd036 R12: 0000000000000001 R13: 0000000000000000 R14: 000000000008619e R15: 0000000000000001 page_table_check_ptes_set include/linux/page_table_check.h:76 [inline] set_ptes include/linux/pgtable.h:292 [inline] __copy_present_ptes mm/memory.c:972 [inline] copy_present_ptes mm/memory.c:1051 [inline] copy_pte_range mm/memory.c:1174 [inline] copy_pmd_range+0x4439/0x71d0 mm/memory.c:1261 copy_pud_range mm/memory.c:1298 [inline] copy_p4d_range mm/memory.c:1322 [inline] copy_page_range+0xc14/0x1270 mm/memory.c:1410 dup_mmap+0xf57/0x1ac0 mm/mmap.c:1834 dup_mm kernel/fork.c:1485 [inline] copy_mm+0x13c/0x4b0 kernel/fork.c:1537 copy_process+0x1706/0x3c00 kernel/fork.c:2175 kernel_clone+0x21e/0x840 kernel/fork.c:2605 __do_sys_clone kernel/fork.c:2748 [inline] __se_sys_clone kernel/fork.c:2732 [inline] __x64_sys_clone+0x18b/0x1e0 kernel/fork.c:2732 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fbf3f18ebe9 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:00007fbf400dcfe8 EFLAGS: 00000206 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 00007fbf3f3b5fa0 RCX: 00007fbf3f18ebe9 RDX: 0000000000000000 RSI: 0000000000000050 RDI: 0000000000904000 RBP: 00007fbf3f211e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 00007fbf3f3b6038 R14: 00007fbf3f3b5fa0 R15: 00007ffd296f89e8 Allocated by task 22712: 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:388 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:405 kasan_kmalloc include/linux/kasan.h:260 [inline] __kmalloc_cache_noprof+0x230/0x3d0 mm/slub.c:4396 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:740 rose_ioctl+0x3ce/0x8b0 net/rose/af_rose.c:1380 sock_do_ioctl+0xdc/0x300 net/socket.c:1238 sock_ioctl+0x576/0x790 net/socket.c:1359 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:598 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 25493: 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:243 [inline] __kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2417 [inline] slab_free mm/slub.c:4680 [inline] kfree+0x18e/0x440 mm/slub.c:4879 rose_rt_device_down+0x473/0x4c0 net/rose/rose_route.c:515 rose_device_event+0x603/0x6a0 net/rose/af_rose.c:248 notifier_call_chain+0x1b6/0x3e0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2267 [inline] call_netdevice_notifiers net/core/dev.c:2281 [inline] netif_close_many+0x29c/0x410 net/core/dev.c:1784 netif_close+0x158/0x210 net/core/dev.c:1797 dev_close+0x10a/0x220 net/core/dev_api.c:220 bpq_device_event+0x377/0x6a0 drivers/net/hamradio/bpqether.c:528 notifier_call_chain+0x1b6/0x3e0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2267 [inline] call_netdevice_notifiers net/core/dev.c:2281 [inline] __dev_notify_flags+0x18d/0x2e0 net/core/dev.c:-1 netif_change_flags+0xe8/0x1a0 net/core/dev.c:9600 dev_change_flags+0x130/0x260 net/core/dev_api.c:68 dev_ioctl+0x7b4/0x1150 net/core/dev_ioctl.c:824 sock_do_ioctl+0x22c/0x300 net/socket.c:1252 sock_ioctl+0x576/0x790 net/socket.c:1359 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:598 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:584 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88805880c800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 42 bytes inside of freed 512-byte region [ffff88805880c800, ffff88805880ca00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88805880c800 pfn:0x5880c head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801a841c80 ffffea0001eb0b10 ffffea0000bd7610 raw: ffff88805880c800 000000000010000c 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801a841c80 ffffea0001eb0b10 ffffea0000bd7610 head: ffff88805880c800 000000000010000c 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0001620301 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5881, tgid 5881 (udevd), ts 85121918469, free_ts 23405781038 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2487 [inline] allocate_slab+0x8a/0x370 mm/slub.c:2655 new_slab mm/slub.c:2709 [inline] ___slab_alloc+0xbeb/0x1410 mm/slub.c:3891 __slab_alloc mm/slub.c:3981 [inline] __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] __kmalloc_cache_noprof+0x296/0x3d0 mm/slub.c:4391 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] kernfs_fop_open+0x397/0xca0 fs/kernfs/file.c:623 do_dentry_open+0x953/0x13f0 fs/open.c:965 vfs_open+0x3b/0x340 fs/open.c:1095 do_open fs/namei.c:3887 [inline] path_openat+0x2ee5/0x3830 fs/namei.c:4046 do_filp_open+0x1fa/0x410 fs/namei.c:4073 do_sys_openat2+0x121/0x1c0 fs/open.c:1435 do_sys_open fs/open.c:1450 [inline] __do_sys_openat fs/open.c:1466 [inline] __se_sys_openat fs/open.c:1461 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1461 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f 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:1395 [inline] __free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2895 __free_pages mm/page_alloc.c:5260 [inline] free_contig_range+0x1bd/0x4a0 mm/page_alloc.c:7091 destroy_args+0x69/0x660 mm/debug_vm_pgtable.c:958 debug_vm_pgtable+0x39f/0x3b0 mm/debug_vm_pgtable.c:1345 do_one_initcall+0x233/0x820 init/main.c:1269 do_initcall_level+0x104/0x190 init/main.c:1331 do_initcalls+0x59/0xa0 init/main.c:1347 kernel_init_freeable+0x334/0x4b0 init/main.c:1579 kernel_init+0x1d/0x1d0 init/main.c:1469 ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff88805880c700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88805880c780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88805880c800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88805880c880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88805880c900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 99 cltd 1: e8 a3 c6 f4 ff call 0xfff4c6a9 6: 48 03 2d bc 20 c8 17 add 0x17c820bc(%rip),%rbp # 0x17c820c9 d: eb 10 jmp 0x1f f: e8 d5 5e 91 ff call 0xff915ee9 14: 48 89 df mov %rbx,%rdi 17: e8 cd e0 ff ff call 0xffffe0e9 1c: 48 89 c5 mov %rax,%rbp 1f: 4c 89 e7 mov %r12,%rdi 22: 4c 89 fe mov %r15,%rsi 25: e8 1f 61 91 ff call 0xff916149 * 2a: 48 85 ed test %rbp,%rbp <-- trapping instruction 2d: 74 54 je 0x83 2f: 4d 39 fc cmp %r15,%r12 32: 73 4f jae 0x83 34: e8 b0 5e 91 ff call 0xff915ee9 39: 49 ff c4 inc %r12 3c: e9 .byte 0xe9 3d: 72 fe jb 0x3d 3f: ff .byte 0xff