================================================================== BUG: KASAN: use-after-free in rose_get_neigh+0x17e/0x550 net/rose/rose_route.c:692 Read of size 1 at addr ffff888058cb4830 by task syz.7.3235/16889 CPU: 1 PID: 16889 Comm: syz.7.3235 Not tainted 6.1.141-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x220 mm/kasan/report.c:427 kasan_report+0x10b/0x140 mm/kasan/report.c:531 rose_get_neigh+0x17e/0x550 net/rose/rose_route.c:692 rose_connect+0x412/0x1380 net/rose/af_rose.c:816 __sys_connect_file net/socket.c:2011 [inline] __sys_connect+0x389/0x410 net/socket.c:2028 __do_sys_connect net/socket.c:2038 [inline] __se_sys_connect net/socket.c:2035 [inline] __x64_sys_connect+0x76/0x80 net/socket.c:2035 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fcd9b78e929 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:00007fcd9b5ff038 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00007fcd9b9b5fa0 RCX: 00007fcd9b78e929 RDX: 000000000000001c RSI: 0000200000000040 RDI: 0000000000000005 RBP: 00007fcd9b810b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fcd9b9b5fa0 R15: 00007fff088133c8 Allocated by task 21: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc_node_track_caller+0xae/0x230 mm/slab_common.c:956 kmalloc_reserve net/core/skbuff.c:446 [inline] __alloc_skb+0x22a/0x7e0 net/core/skbuff.c:515 __netdev_alloc_skb+0x107/0x4d0 net/core/skbuff.c:579 netdev_alloc_skb include/linux/skbuff.h:3206 [inline] dev_alloc_skb include/linux/skbuff.h:3219 [inline] __ieee80211_beacon_get+0xc48/0x1f50 net/mac80211/tx.c:5260 ieee80211_beacon_get_tim+0x5b/0x4d0 net/mac80211/tx.c:5342 ieee80211_beacon_get include/net/mac80211.h:5262 [inline] mac80211_hwsim_beacon_tx+0x21c/0xae0 drivers/net/wireless/mac80211_hwsim.c:2086 __iterate_interfaces+0x243/0x500 net/mac80211/util.c:788 ieee80211_iterate_active_interfaces_atomic+0xd7/0x170 net/mac80211/util.c:824 mac80211_hwsim_beacon+0xb7/0x1b0 drivers/net/wireless/mac80211_hwsim.c:2142 __run_hrtimer kernel/time/hrtimer.c:1752 [inline] __hrtimer_run_queues+0x554/0xd60 kernel/time/hrtimer.c:1816 hrtimer_run_softirq+0x183/0x2a0 kernel/time/hrtimer.c:1833 handle_softirqs+0x2a1/0x920 kernel/softirq.c:596 run_ksoftirqd+0x98/0xf0 kernel/softirq.c:963 smpboot_thread_fn+0x64a/0xa40 kernel/smpboot.c:164 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Freed by task 21: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x2d/0x50 mm/kasan/generic.c:516 ____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:177 [inline] slab_free_hook mm/slub.c:1724 [inline] slab_free_freelist_hook+0x131/0x1a0 mm/slub.c:1750 slab_free mm/slub.c:3661 [inline] __kmem_cache_free+0xb6/0x1f0 mm/slub.c:3674 skb_free_head net/core/skbuff.c:762 [inline] skb_release_data+0x5db/0x7c0 net/core/skbuff.c:791 skb_release_all net/core/skbuff.c:856 [inline] __kfree_skb net/core/skbuff.c:870 [inline] consume_skb+0xa2/0x100 net/core/skbuff.c:1035 mac80211_hwsim_beacon_tx+0x61e/0xae0 drivers/net/wireless/mac80211_hwsim.c:2116 __iterate_interfaces+0x243/0x500 net/mac80211/util.c:788 ieee80211_iterate_active_interfaces_atomic+0xd7/0x170 net/mac80211/util.c:824 mac80211_hwsim_beacon+0xb7/0x1b0 drivers/net/wireless/mac80211_hwsim.c:2142 __run_hrtimer kernel/time/hrtimer.c:1752 [inline] __hrtimer_run_queues+0x554/0xd60 kernel/time/hrtimer.c:1816 hrtimer_run_softirq+0x183/0x2a0 kernel/time/hrtimer.c:1833 handle_softirqs+0x2a1/0x920 kernel/softirq.c:596 run_ksoftirqd+0x98/0xf0 kernel/softirq.c:963 smpboot_thread_fn+0x64a/0xa40 kernel/smpboot.c:164 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Last potentially related work creation: kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486 call_rcu+0x14b/0x970 kernel/rcu/tree.c:2845 fib6_info_release include/net/ip6_fib.h:340 [inline] __ip6_del_rt+0xf1/0x150 net/ipv6/route.c:3917 ip6_del_rt+0xb0/0xf0 net/ipv6/route.c:3928 __ipv6_ifa_notify+0x81d/0xdb0 net/ipv6/addrconf.c:6247 addrconf_ifdown+0xe9a/0x1a10 net/ipv6/addrconf.c:3928 addrconf_notify+0x405/0xf40 net/ipv6/addrconf.c:-1 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:455 call_netdevice_notifiers_extack net/core/dev.c:2039 [inline] call_netdevice_notifiers net/core/dev.c:2053 [inline] dev_close_many+0x28d/0x400 net/core/dev.c:1601 unregister_netdevice_many+0x471/0x1840 net/core/dev.c:10952 default_device_exit_batch+0x9c3/0xa50 net/core/dev.c:11491 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x77b/0xb80 net/core/net_namespace.c:640 process_one_work+0x898/0x1160 kernel/workqueue.c:2292 worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff888058cb4800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 48 bytes inside of 512-byte region [ffff888058cb4800, ffff888058cb4a00) The buggy address belongs to the physical page: page:ffffea0001632d00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888058cb6000 pfn:0x58cb4 head:ffffea0001632d00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea00015ebf08 ffffea000159aa08 ffff888017441c80 raw: ffff888058cb6000 000000000010000d 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 4256, tgid 4256 (syz-executor), ts 79144388576, free_ts 79144054420 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328 __alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614 alloc_slab_page+0x5d/0x160 mm/slub.c:1794 allocate_slab mm/slub.c:1939 [inline] new_slab+0x87/0x2c0 mm/slub.c:1992 ___slab_alloc+0xbc6/0x1220 mm/slub.c:3180 __slab_alloc mm/slub.c:3279 [inline] slab_alloc_node mm/slub.c:3364 [inline] __kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3437 __do_kmalloc_node mm/slab_common.c:935 [inline] __kmalloc+0xa0/0x240 mm/slab_common.c:949 kmalloc include/linux/slab.h:568 [inline] kzalloc include/linux/slab.h:699 [inline] new_dir fs/proc/proc_sysctl.c:969 [inline] get_subdir fs/proc/proc_sysctl.c:1013 [inline] __register_sysctl_table+0x96c/0xe70 fs/proc/proc_sysctl.c:1375 neigh_sysctl_register+0x993/0xa70 net/core/neighbour.c:3852 addrconf_sysctl_register+0xac/0x1b0 net/ipv6/addrconf.c:7197 ipv6_add_dev+0xbe0/0x1120 net/ipv6/addrconf.c:451 addrconf_notify+0x634/0xf40 net/ipv6/addrconf.c:3601 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:455 call_netdevice_notifiers_extack net/core/dev.c:2039 [inline] call_netdevice_notifiers net/core/dev.c:2053 [inline] register_netdevice+0x1600/0x1aa0 net/core/dev.c:10225 veth_newlink+0x592/0xbe0 drivers/net/veth.c:1724 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare mm/page_alloc.c:1509 [inline] free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3479 __stack_depot_save+0x435/0x460 lib/stackdepot.c:506 kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x60/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x6b/0x80 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x4b/0x480 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x123/0x2f0 mm/slub.c:3422 kmem_cache_zalloc include/linux/slab.h:689 [inline] fill_pool lib/debugobjects.c:169 [inline] debug_objects_fill_pool+0x34a/0x650 lib/debugobjects.c:607 __debug_object_init+0x29/0x420 lib/debugobjects.c:617 debug_timer_init kernel/time/timer.c:777 [inline] debug_init kernel/time/timer.c:825 [inline] init_timer_key+0x3e/0x320 kernel/time/timer.c:869 ip_mc_init_dev+0x8d/0x1d0 net/ipv4/igmp.c:1776 inetdev_init+0x35b/0x4f0 net/ipv4/devinet.c:288 inetdev_event+0x270/0x1410 net/ipv4/devinet.c:1548 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:455 call_netdevice_notifiers_extack net/core/dev.c:2039 [inline] call_netdevice_notifiers net/core/dev.c:2053 [inline] register_netdevice+0x1600/0x1aa0 net/core/dev.c:10225 veth_newlink+0x592/0xbe0 drivers/net/veth.c:1724 Memory state around the buggy address: ffff888058cb4700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888058cb4780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888058cb4800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888058cb4880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888058cb4900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================