================================================================== BUG: KASAN: use-after-free in rose_transmit_link+0x5b6/0x730 net/rose/rose_link.c:266 Read of size 1 at addr ffff888055e72032 by task syz.4.1755/11768 CPU: 1 PID: 11768 Comm: syz.4.1755 Not tainted 6.1.147-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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/0x200 mm/kasan/report.c:418 kasan_report+0x10b/0x140 mm/kasan/report.c:522 rose_transmit_link+0x5b6/0x730 net/rose/rose_link.c:266 rose_write_internal+0x1096/0x1eb0 net/rose/rose_subr.c:198 rose_release+0x22a/0x4f0 net/rose/af_rose.c:671 __sock_release net/socket.c:654 [inline] sock_close+0xd5/0x240 net/socket.c:1400 __fput+0x22c/0x920 fs/file_table.c:320 task_work_run+0x1ca/0x250 kernel/task_work.c:203 get_signal+0x11a6/0x1350 kernel/signal.c:2648 arch_do_signal_or_restart+0xb0/0x1230 arch/x86/kernel/signal.c:871 exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fc9caf8ebe9 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:00007fc9cbd35038 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: fffffffffffffe00 RBX: 00007fc9cb1b6090 RCX: 00007fc9caf8ebe9 RDX: 0000000000000040 RSI: 0000200000000100 RDI: 000000000000000a RBP: 00007fc9cb011e19 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fc9cb1b6128 R14: 00007fc9cb1b6090 R15: 00007ffd7001c538 Allocated by task 8009: 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 kmalloc include/linux/slab.h:563 [inline] rose_add_node+0x227/0xdb0 net/rose/rose_route.c:85 rose_rt_ioctl+0xa4c/0xe90 net/rose/rose_route.c:740 rose_ioctl+0x27a/0x790 net/rose/af_rose.c:1380 sock_do_ioctl+0xd3/0x2f0 net/socket.c:1204 sock_ioctl+0x4ed/0x6e0 net/socket.c:1321 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856 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 Freed by task 11765: 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 rose_rt_device_down+0x4e2/0x530 net/rose/rose_route.c:515 rose_device_event+0x600/0x690 net/rose/af_rose.c:248 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_notify_flags+0x178/0x2d0 net/core/dev.c:-1 dev_change_flags+0xe3/0x1a0 net/core/dev.c:8702 dev_ifsioc+0x159/0xe90 net/core/dev_ioctl.c:327 dev_ioctl+0x578/0xea0 net/core/dev_ioctl.c:588 sock_do_ioctl+0x222/0x2f0 net/socket.c:1218 sock_ioctl+0x4ed/0x6e0 net/socket.c:1321 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xfa/0x170 fs/ioctl.c:856 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 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+0x154/0x980 kernel/rcu/tree.c:2849 fib6_info_release include/net/ip6_fib.h:340 [inline] ip6_route_info_create+0x9c5/0x1210 net/ipv6/route.c:3876 ip6_route_add+0x24/0x130 net/ipv6/route.c:3890 addrconf_prefix_route+0x20d/0x2b0 net/ipv6/addrconf.c:2443 inet6_addr_add+0x4fe/0x9b0 net/ipv6/addrconf.c:3017 inet6_rtm_newaddr+0x617/0x870 net/ipv6/addrconf.c:4974 rtnetlink_rcv_msg+0x79b/0xed0 net/core/rtnetlink.c:6153 netlink_rcv_skb+0x1de/0x420 net/netlink/af_netlink.c:2511 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x74d/0x8d0 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x89e/0xbc0 net/netlink/af_netlink.c:1872 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 entry_SYSCALL_64_after_hwframe+0x68/0xd2 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 kvfree_call_rcu+0x108/0x870 kernel/rcu/tree.c:3405 drop_sysctl_table+0x2fa/0x430 fs/proc/proc_sysctl.c:1731 drop_sysctl_table+0x2e9/0x430 fs/proc/proc_sysctl.c:1734 unregister_sysctl_table+0x85/0x130 fs/proc/proc_sysctl.c:1769 neigh_sysctl_unregister+0x74/0x90 net/core/neighbour.c:3871 devinet_sysctl_unregister net/ipv4/devinet.c:2665 [inline] inetdev_destroy net/ipv4/devinet.c:329 [inline] inetdev_event+0x733/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] 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_dev_reload_down+0x86/0xb0 drivers/net/netdevsim/dev.c:968 devlink_reload+0x1f1/0x660 net/devlink/leftover.c:4472 devlink_pernet_pre_exit+0x116/0x270 net/devlink/leftover.c:12501 ops_pre_exit_list net/core/net_namespace.c:162 [inline] cleanup_net+0x57b/0xb80 net/core/net_namespace.c:620 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 ffff888055e72000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 50 bytes inside of 512-byte region [ffff888055e72000, ffff888055e72200) The buggy address belongs to the physical page: page:ffffea0001579c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888055e71800 pfn:0x55e70 head:ffffea0001579c00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0000a36508 ffffea0001582308 ffff888017441c80 raw: ffff888055e71800 0000000000100003 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 4265, tgid 4265 (syz-executor), ts 64501464519, free_ts 64483475696 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:973 [inline] get_subdir fs/proc/proc_sysctl.c:1017 [inline] __register_sysctl_table+0x96c/0xe70 fs/proc/proc_sysctl.c:1379 mpls_dev_sysctl_register+0x1e4/0x2d0 net/mpls/af_mpls.c:1421 mpls_dev_notify+0x686/0x760 net/mpls/af_mpls.c:1666 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_change_name+0x630/0x8c0 net/core/dev.c:1282 do_setlink+0x9c5/0x3c40 net/core/rtnetlink.c:2813 __rtnl_newlink net/core/rtnetlink.c:3608 [inline] rtnl_newlink+0x17d6/0x1ff0 net/core/rtnetlink.c:3655 rtnetlink_rcv_msg+0x79b/0xed0 net/core/rtnetlink.c:6153 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 ref_tracker_alloc+0x180/0x450 lib/ref_tracker.c:92 __netdev_tracker_alloc include/linux/netdevice.h:4051 [inline] netdev_hold include/linux/netdevice.h:4080 [inline] dst_init+0xda/0x410 net/core/dst.c:52 dst_alloc+0x12a/0x160 net/core/dst.c:92 ip6_dst_alloc net/ipv6/route.c:345 [inline] ip6_rt_pcpu_alloc net/ipv6/route.c:1412 [inline] rt6_make_pcpu_route net/ipv6/route.c:1461 [inline] ip6_pol_route+0x94d/0x1260 net/ipv6/route.c:2295 pol_lookup_func include/net/ip6_fib.h:579 [inline] fib6_rule_lookup+0x1d3/0x570 net/ipv6/fib6_rules.c:116 ip6_route_input_lookup net/ipv6/route.c:2328 [inline] ip6_route_input+0x6bf/0xa40 net/ipv6/route.c:2624 ip6_rcv_finish+0x13f/0x230 net/ipv6/ip6_input.c:77 NF_HOOK+0x2ff/0x390 include/linux/netfilter.h:302 __netif_receive_skb_one_core net/core/dev.c:5569 [inline] __netif_receive_skb+0xcc/0x290 net/core/dev.c:5683 process_backlog+0x37c/0x6e0 net/core/dev.c:6011 __napi_poll+0xc0/0x460 net/core/dev.c:6578 napi_poll net/core/dev.c:6645 [inline] net_rx_action+0x5b1/0xad0 net/core/dev.c:6759 handle_softirqs+0x2a1/0x920 kernel/softirq.c:596 Memory state around the buggy address: ffff888055e71f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888055e71f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888055e72000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888055e72080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888055e72100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================