================================================================== BUG: KASAN: use-after-free in rose_timer_expiry+0x471/0x4b0 net/rose/rose_timer.c:183 Read of size 2 at addr ffff88805523342a by task syz.4.1216/10210 CPU: 0 UID: 0 PID: 10210 Comm: syz.4.1216 Not tainted 6.16.0-rc5-syzkaller-01458-gc3886ccaadf8 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xd2/0x2b0 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+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+0x286/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:instrument_atomic_read include/linux/instrumented.h:68 [inline] RIP: 0010:atomic_long_read include/linux/atomic/atomic-instrumented.h:3188 [inline] RIP: 0010:__mutex_owner kernel/locking/mutex.h:47 [inline] RIP: 0010:mutex_spin_on_owner+0x27b/0x360 kernel/locking/mutex.c:351 Code: be 08 00 00 00 e8 b5 f6 85 00 42 80 7c 35 00 00 74 08 4c 89 e7 e8 35 f4 85 00 49 f7 04 24 01 00 00 00 0f 85 8c 00 00 00 f3 90 <4c> 89 e7 be 08 00 00 00 e8 88 f6 85 00 42 80 7c 35 00 00 0f 84 90 RSP: 0018:ffffc90005736e88 EFLAGS: 00000246 RAX: 1ffff11005659b40 RBX: ffffffff8f520630 RCX: ffffffff819dc408 RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000001 RBP: 1ffffffff1ea40bc R08: ffffffff8f5205e7 R09: 1ffffffff1ea40bc R10: dffffc0000000000 R11: fffffbfff1ea40bd R12: ffffffff8f5205e0 R13: ffffffff8f520630 R14: dffffc0000000000 R15: ffff88802e068000 mutex_optimistic_spin kernel/locking/mutex.c:468 [inline] __mutex_lock_common kernel/locking/mutex.c:606 [inline] __mutex_lock+0x30c/0xe80 kernel/locking/mutex.c:747 rtnl_lock net/core/rtnetlink.c:80 [inline] rtnl_nets_lock net/core/rtnetlink.c:341 [inline] rtnl_newlink+0x8db/0x1c70 net/core/rtnetlink.c:4056 rtnetlink_rcv_msg+0x7cc/0xb70 net/core/rtnetlink.c:6946 netlink_rcv_skb+0x205/0x470 net/netlink/af_netlink.c:2552 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x759/0x8e0 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1896 sock_sendmsg_nosec net/socket.c:714 [inline] __sock_sendmsg+0x21c/0x270 net/socket.c:729 ____sys_sendmsg+0x505/0x830 net/socket.c:2614 ___sys_sendmsg+0x21f/0x2a0 net/socket.c:2668 __sys_sendmsg net/socket.c:2700 [inline] __do_sys_sendmsg net/socket.c:2705 [inline] __se_sys_sendmsg net/socket.c:2703 [inline] __x64_sys_sendmsg+0x19b/0x260 net/socket.c:2703 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:0x7fcde9f8e929 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:00007fcdeade1038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fcdea1b6080 RCX: 00007fcde9f8e929 RDX: 000000000000c0b0 RSI: 0000200000000280 RDI: 0000000000000005 RBP: 00007fcdea010ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000001 R14: 00007fcdea1b6080 R15: 00007ffe8f1a1828 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x55233 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 9613, tgid 9608 (syz.2.1042), ts 240935895045, free_ts 254815274353 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab+0x8a/0x3b0 mm/slub.c:2619 new_slab mm/slub.c:2673 [inline] ___slab_alloc+0xbfc/0x1480 mm/slub.c:3859 __slab_alloc mm/slub.c:3949 [inline] __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] __kmalloc_cache_noprof+0x296/0x3d0 mm/slub.c:4354 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] genradix_alloc_node include/linux/generic-radix-tree.h:101 [inline] __genradix_ptr_alloc+0x352/0x4a0 lib/generic-radix-tree.c:69 __genradix_prealloc+0x44/0x90 lib/generic-radix-tree.c:216 sctp_stream_alloc_out net/sctp/stream.c:104 [inline] sctp_stream_init+0x14b/0x440 net/sctp/stream.c:149 sctp_association_init net/sctp/associola.c:232 [inline] sctp_association_new+0x10dd/0x25f0 net/sctp/associola.c:296 sctp_connect_new_asoc+0x2c5/0x690 net/sctp/socket.c:1092 __sctp_connect+0x5ba/0xd50 net/sctp/socket.c:1198 __sctp_setsockopt_connectx net/sctp/socket.c:1337 [inline] sctp_getsockopt_connectx3+0x2c4/0x440 net/sctp/socket.c:1422 sctp_getsockopt+0x98a/0xb60 net/sctp/socket.c:8134 do_sock_getsockopt+0x360/0x650 net/socket.c:2405 page last free pid 9984 tgid 9983 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0xc71/0xe70 mm/page_alloc.c:2706 discard_slab mm/slub.c:2717 [inline] __put_partials+0x161/0x1c0 mm/slub.c:3186 put_cpu_partial+0x17c/0x250 mm/slub.c:3261 __slab_free+0x2f7/0x400 mm/slub.c:4513 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4148 [inline] slab_alloc_node mm/slub.c:4197 [inline] __kmalloc_cache_noprof+0x1be/0x3d0 mm/slub.c:4354 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] ref_tracker_alloc+0x133/0x460 lib/ref_tracker.c:271 __netns_tracker_alloc include/net/net_namespace.h:357 [inline] netns_tracker_alloc include/net/net_namespace.h:366 [inline] get_net_track include/net/net_namespace.h:383 [inline] sk_alloc+0x1b1/0x370 net/core/sock.c:2301 __netlink_create+0x65/0x260 net/netlink/af_netlink.c:628 netlink_create+0x3ca/0x590 net/netlink/af_netlink.c:686 __sock_create+0x4b0/0x9f0 net/socket.c:1589 sock_create net/socket.c:1647 [inline] __sys_socket_create net/socket.c:1684 [inline] __sys_socket+0xd7/0x1b0 net/socket.c:1731 __do_sys_socket net/socket.c:1745 [inline] __se_sys_socket net/socket.c:1743 [inline] __x64_sys_socket+0x7a/0x90 net/socket.c:1743 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 Memory state around the buggy address: ffff888055233300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888055233380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888055233400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888055233480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888055233500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== ---------------- Code disassembly (best guess): 0: be 08 00 00 00 mov $0x8,%esi 5: e8 b5 f6 85 00 call 0x85f6bf a: 42 80 7c 35 00 00 cmpb $0x0,0x0(%rbp,%r14,1) 10: 74 08 je 0x1a 12: 4c 89 e7 mov %r12,%rdi 15: e8 35 f4 85 00 call 0x85f44f 1a: 49 f7 04 24 01 00 00 testq $0x1,(%r12) 21: 00 22: 0f 85 8c 00 00 00 jne 0xb4 28: f3 90 pause * 2a: 4c 89 e7 mov %r12,%rdi <-- trapping instruction 2d: be 08 00 00 00 mov $0x8,%esi 32: e8 88 f6 85 00 call 0x85f6bf 37: 42 80 7c 35 00 00 cmpb $0x0,0x0(%rbp,%r14,1) 3d: 0f .byte 0xf 3e: 84 .byte 0x84 3f: 90 nop