================================================================== BUG: KASAN: use-after-free in rose_get_neigh+0x17e/0x550 net/rose/rose_route.c:690 Read of size 1 at addr ffff888060d46c30 by task syz.7.2482/14890 CPU: 1 PID: 14890 Comm: syz.7.2482 Not tainted 5.15.181-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/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_get_neigh+0x17e/0x550 net/rose/rose_route.c:690 rose_connect+0x412/0x1370 net/rose/af_rose.c:814 __sys_connect_file net/socket.c:1923 [inline] __sys_connect+0x389/0x410 net/socket.c:1940 __do_sys_connect net/socket.c:1950 [inline] __se_sys_connect net/socket.c:1947 [inline] __x64_sys_connect+0x76/0x80 net/socket.c:1947 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:0x7f5a3dee8969 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:00007f5a3bd50038 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00007f5a3e10ffa0 RCX: 00007f5a3dee8969 RDX: 000000000000001c RSI: 0000200000000040 RDI: 0000000000000007 RBP: 00007f5a3df6aab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f5a3e10ffa0 R15: 00007ffdcd11f4f8 Allocated by task 14: 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 skb_copy+0x139/0x790 net/core/skbuff.c:1595 can_can_gw_rcv+0x324/0xd20 net/can/gw.c:510 deliver net/can/af_can.c:575 [inline] can_rcv_filter+0x120/0x7a0 net/can/af_can.c:602 can_receive+0x2e8/0x410 net/can/af_can.c:666 can_rcv+0x149/0x2a0 net/can/af_can.c:697 __netif_receive_skb_one_core net/core/dev.c:5525 [inline] __netif_receive_skb+0xcc/0x290 net/core/dev.c:5639 process_backlog+0x364/0x780 net/core/dev.c:6516 __napi_poll+0xc0/0x430 net/core/dev.c:7075 napi_poll net/core/dev.c:7142 [inline] net_rx_action+0x4a8/0x9c0 net/core/dev.c:7232 handle_softirqs+0x328/0x820 kernel/softirq.c:558 run_ksoftirqd+0x98/0xf0 kernel/softirq.c:925 smpboot_thread_fn+0x4f6/0x970 kernel/smpboot.c:164 kthread+0x436/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 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 __call_rcu kernel/rcu/tree.c:3007 [inline] call_rcu+0x179/0x920 kernel/rcu/tree.c:3087 fib6_info_release include/net/ip6_fib.h:339 [inline] fib6_del_route net/ipv6/ip6_fib.c:1998 [inline] fib6_del+0x10d9/0x1500 net/ipv6/ip6_fib.c:2031 fib6_clean_node+0x296/0x580 net/ipv6/ip6_fib.c:2193 fib6_walk_continue+0x640/0x8c0 net/ipv6/ip6_fib.c:2115 fib6_walk+0x149/0x290 net/ipv6/ip6_fib.c:2163 fib6_clean_tree net/ipv6/ip6_fib.c:2243 [inline] __fib6_clean_all+0x20e/0x350 net/ipv6/ip6_fib.c:2259 rt6_sync_down_dev net/ipv6/route.c:4915 [inline] rt6_disable_ip+0x11f/0x690 net/ipv6/route.c:4920 addrconf_ifdown+0x149/0x1970 net/ipv6/addrconf.c:3778 addrconf_notify+0x445/0xf00 net/ipv6/addrconf.c:-1 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 unregister_netdevice_many+0x472/0x18f0 net/core/dev.c:11110 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 ffff888060d46c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 48 bytes inside of 512-byte region [ffff888060d46c00, ffff888060d46e00) The buggy address belongs to the page: page:ffffea0001835100 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888060d46400 pfn:0x60d44 head:ffffea0001835100 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0001e71a08 ffffea0001860508 ffff888016841c80 raw: ffff888060d46400 0000000000100001 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 154, ts 71458397630, free_ts 27433404207 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:5466 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] fib6_info_alloc+0x2e/0xe0 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x44f/0x1210 net/ipv6/route.c:3769 addrconf_f6i_alloc+0x1b9/0x3f0 net/ipv6/route.c:4592 ipv6_add_addr+0x438/0xde0 net/ipv6/addrconf.c:1123 addrconf_add_linklocal+0x280/0x6b0 net/ipv6/addrconf.c:3242 addrconf_addr_gen+0x4ee/0x620 net/ipv6/addrconf.c:3373 addrconf_init_auto_addrs+0x785/0xb50 net/ipv6/addrconf.c:-1 addrconf_notify+0xa6b/0xf00 net/ipv6/addrconf.c:3665 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391 netdev_state_change+0xd2/0x140 net/core/dev.c:1440 linkwatch_do_dev+0x10d/0x160 net/core/link_watch.c:167 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 free_contig_range+0x96/0xf0 mm/page_alloc.c:9385 destroy_args+0xef/0x8b0 mm/debug_vm_pgtable.c:1018 debug_vm_pgtable+0x318/0x370 mm/debug_vm_pgtable.c:1331 do_one_initcall+0x1ee/0x680 init/main.c:1302 do_initcall_level+0x137/0x1f0 init/main.c:1375 do_initcalls+0x4b/0x90 init/main.c:1391 kernel_init_freeable+0x3ce/0x560 init/main.c:1615 kernel_init+0x19/0x1b0 init/main.c:1506 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Memory state around the buggy address: ffff888060d46b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888060d46b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888060d46c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888060d46c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888060d46d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================