================================================================== BUG: KASAN: use-after-free in rose_get_neigh+0x17e/0x550 net/rose/rose_route.c:692 Read of size 1 at addr ffff88807c131830 by task syz.5.2750/18081 CPU: 0 PID: 18081 Comm: syz.5.2750 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:0x7f25d058e929 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:00007f25d14a0038 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00007f25d07b6160 RCX: 00007f25d058e929 RDX: 000000000000001c RSI: 0000200000000040 RDI: 0000000000000004 RBP: 00007f25d0610b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000001 R14: 00007f25d07b6160 R15: 00007ffcedf3aaa8 Allocated by task 5648: 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 alloc_skb include/linux/skbuff.h:1271 [inline] ndisc_alloc_skb+0xa6/0x450 net/ipv6/ndisc.c:423 ndisc_ns_create+0x1ce/0x620 net/ipv6/ndisc.c:626 ndisc_send_ns+0xab/0x150 net/ipv6/ndisc.c:668 addrconf_dad_work+0xa15/0x14d0 net/ipv6/addrconf.c:4225 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 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 kvfree_call_rcu+0x108/0x870 kernel/rcu/tree.c:3401 drop_sysctl_table+0x2fa/0x430 fs/proc/proc_sysctl.c:1727 drop_sysctl_table+0x2e9/0x430 fs/proc/proc_sysctl.c:1730 unregister_sysctl_table+0x85/0x130 fs/proc/proc_sysctl.c:1765 __devinet_sysctl_unregister net/ipv4/devinet.c:2636 [inline] devinet_sysctl_unregister net/ipv4/devinet.c:2664 [inline] inetdev_destroy net/ipv4/devinet.c:329 [inline] inetdev_event+0x6db/0x1410 net/ipv4/devinet.c:1616 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] unregister_netdevice_many+0xfdc/0x1840 net/core/dev.c:10978 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 Second to 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 inetdev_destroy net/ipv4/devinet.c:333 [inline] inetdev_event+0x77a/0x1410 net/ipv4/devinet.c:1616 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] unregister_netdevice_many+0xfdc/0x1840 net/core/dev.c:10978 unregister_netdevice_queue+0x31c/0x360 net/core/dev.c:10909 unregister_netdevice include/linux/netdevice.h:3075 [inline] lapbeth_free_device drivers/net/wan/lapbether.c:437 [inline] lapbeth_device_event+0x65d/0xa10 drivers/net/wan/lapbether.c:472 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] unregister_netdevice_many+0xfdc/0x1840 net/core/dev.c:10978 unregister_netdevice_queue+0x31c/0x360 net/core/dev.c:10909 unregister_netdevice include/linux/netdevice.h:3075 [inline] nsim_destroy+0x49/0x150 drivers/net/netdevsim/netdev.c:382 __nsim_dev_port_del+0x155/0x1c0 drivers/net/netdevsim/dev.c:1433 nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1445 [inline] nsim_dev_reload_destroy+0x283/0x480 drivers/net/netdevsim/dev.c:1662 nsim_drv_remove+0x5c/0x160 drivers/net/netdevsim/dev.c:1678 device_remove drivers/base/dd.c:548 [inline] __device_release_driver drivers/base/dd.c:1260 [inline] device_release_driver_internal+0x4be/0x850 drivers/base/dd.c:1286 bus_remove_device+0x2e2/0x400 drivers/base/bus.c:531 device_del+0x628/0xa70 drivers/base/core.c:3885 device_unregister+0x1c/0xc0 drivers/base/core.c:3928 nsim_bus_dev_del drivers/net/netdevsim/bus.c:310 [inline] del_device_store+0x2a7/0x360 drivers/net/netdevsim/bus.c:219 kernfs_fop_write_iter+0x379/0x4c0 fs/kernfs/file.c:334 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x44c/0x960 fs/read_write.c:584 ksys_write+0x143/0x240 fs/read_write.c:637 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 The buggy address belongs to the object at ffff88807c131800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 48 bytes inside of 512-byte region [ffff88807c131800, ffff88807c131a00) The buggy address belongs to the physical page: page:ffffea0001f04c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88807c132000 pfn:0x7c130 head:ffffea0001f04c00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea00008d5408 ffffea0001f89208 ffff888017441c80 raw: ffff88807c132000 0000000000100007 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 4255, tgid 4255 (syz-executor), ts 68548448611, free_ts 58319976196 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_node_track_caller+0x9e/0x230 mm/slab_common.c:956 kmalloc_reserve net/core/skbuff.c:446 [inline] __alloc_skb+0x22a/0x7e0 net/core/skbuff.c:515 alloc_skb include/linux/skbuff.h:1271 [inline] nlmsg_new include/net/netlink.h:991 [inline] netlink_ack+0x372/0x1100 net/netlink/af_netlink.c:2430 netlink_rcv_skb+0x263/0x420 net/netlink/af_netlink.c:2499 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x74c/0x8c0 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x89e/0xbc0 net/netlink/af_netlink.c:1859 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] __sys_sendto+0x44f/0x5c0 net/socket.c:2153 __do_sys_sendto net/socket.c:2165 [inline] __se_sys_sendto net/socket.c:2161 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2161 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 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 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:305 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 vm_area_dup+0x23/0x1a0 kernel/fork.c:467 __split_vma+0xb9/0x500 mm/mmap.c:2351 do_mas_align_munmap+0x762/0x1220 mm/mmap.c:2489 do_mas_munmap+0x240/0x2b0 mm/mmap.c:2638 __mmap_region mm/mmap.c:2686 [inline] mmap_region+0x713/0x1d30 mm/mmap.c:2904 do_mmap+0x894/0xf30 mm/mmap.c:1424 vm_mmap_pgoff+0x1b2/0x2b0 mm/util.c:520 ksys_mmap_pgoff+0x516/0x6f0 mm/mmap.c:1470 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 Memory state around the buggy address: ffff88807c131700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807c131780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88807c131800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807c131880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807c131900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================