netdevsim netdevsim5 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0 ================================================================== BUG: KASAN: slab-use-after-free in __mutex_lock_common kernel/locking/rtmutex_api.c:534 [inline] BUG: KASAN: slab-use-after-free in mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:553 Read of size 1 at addr ffff888059c0baa8 by task kworker/u8:17/1522 CPU: 1 UID: 0 PID: 1522 Comm: kworker/u8:17 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026 Workqueue: udp_tunnel_nic udp_tunnel_nic_device_sync_work Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description+0x55/0x1e0 mm/kasan/report.c:378 print_report+0x58/0x70 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 __kasan_check_byte+0x2a/0x40 mm/kasan/common.c:574 kasan_check_byte include/linux/kasan.h:402 [inline] lock_acquire+0x84/0x350 kernel/locking/lockdep.c:5842 __mutex_lock_common kernel/locking/rtmutex_api.c:534 [inline] mutex_lock_nested+0x5a/0x1d0 kernel/locking/rtmutex_api.c:553 udp_tunnel_nic_device_sync_work+0x39/0xa10 net/ipv4/udp_tunnel_nic.c:737 process_one_work kernel/workqueue.c:3302 [inline] process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3385 worker_thread+0xa53/0xfc0 kernel/workqueue.c:3466 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 9750: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5295 [inline] __kmalloc_noprof+0x3e7/0x7b0 mm/slub.c:5307 kmalloc_noprof include/linux/slab.h:954 [inline] kzalloc_noprof include/linux/slab.h:1188 [inline] udp_tunnel_nic_alloc net/ipv4/udp_tunnel_nic.c:756 [inline] udp_tunnel_nic_register net/ipv4/udp_tunnel_nic.c:833 [inline] udp_tunnel_nic_netdevice_event+0x4c3/0x17d0 net/ipv4/udp_tunnel_nic.c:931 notifier_call_chain+0x1ad/0x3d0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2287 [inline] call_netdevice_notifiers net/core/dev.c:2301 [inline] register_netdevice+0x18d5/0x1ed0 net/core/dev.c:11458 nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1069 [inline] nsim_create+0xbff/0x1170 drivers/net/netdevsim/netdev.c:1151 __nsim_dev_port_add+0x857/0xd30 drivers/net/netdevsim/dev.c:1509 nsim_dev_port_add_all+0x37/0xf0 drivers/net/netdevsim/dev.c:1570 nsim_drv_probe+0x90d/0xc30 drivers/net/netdevsim/dev.c:1731 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x267/0xaf0 drivers/base/dd.c:709 __driver_probe_device+0x1ef/0x380 drivers/base/dd.c:871 driver_probe_device+0x4f/0x240 drivers/base/dd.c:901 __device_attach_driver+0x279/0x430 drivers/base/dd.c:1029 bus_for_each_drv+0x25b/0x2f0 drivers/base/bus.c:500 __device_attach+0x2c8/0x450 drivers/base/dd.c:1101 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1156 bus_probe_device+0x12d/0x220 drivers/base/bus.c:613 device_add+0x7e9/0xbb0 drivers/base/core.c:3706 nsim_bus_dev_new drivers/net/netdevsim/bus.c:471 [inline] new_device_store+0x37b/0x710 drivers/net/netdevsim/bus.c:191 kernfs_fop_write_iter+0x3b0/0x540 fs/kernfs/file.c:352 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x629/0xba0 fs/read_write.c:688 ksys_write+0x156/0x270 fs/read_write.c:740 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 10457: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2689 [inline] slab_free mm/slub.c:6250 [inline] kfree+0x1c5/0x6c0 mm/slub.c:6565 udp_tunnel_nic_free net/ipv4/udp_tunnel_nic.c:785 [inline] udp_tunnel_nic_unregister net/ipv4/udp_tunnel_nic.c:910 [inline] udp_tunnel_nic_netdevice_event+0x11ed/0x17d0 net/ipv4/udp_tunnel_nic.c:942 notifier_call_chain+0x1ad/0x3d0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2287 [inline] call_netdevice_notifiers net/core/dev.c:2301 [inline] unregister_netdevice_many_notify+0x17a5/0x22b0 net/core/dev.c:12418 unregister_netdevice_many net/core/dev.c:12481 [inline] unregister_netdevice_queue+0x31f/0x360 net/core/dev.c:12291 unregister_netdevice include/linux/netdevice.h:3444 [inline] nsim_destroy+0x277/0x7f0 drivers/net/netdevsim/netdev.c:1193 __nsim_dev_port_del+0x14f/0x200 drivers/net/netdevsim/dev.c:1547 nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1561 [inline] nsim_dev_reload_destroy+0x288/0x490 drivers/net/netdevsim/dev.c:1785 nsim_drv_remove+0x58/0x160 drivers/net/netdevsim/dev.c:1800 device_remove drivers/base/dd.c:619 [inline] __device_release_driver drivers/base/dd.c:1352 [inline] device_release_driver_internal+0x46f/0x870 drivers/base/dd.c:1375 bus_remove_device+0x45a/0x570 drivers/base/bus.c:657 device_del+0x52b/0x900 drivers/base/core.c:3895 device_unregister+0x21/0xf0 drivers/base/core.c:3936 nsim_bus_dev_del drivers/net/netdevsim/bus.c:491 [inline] del_device_store+0x2b0/0x370 drivers/net/netdevsim/bus.c:244 kernfs_fop_write_iter+0x3b0/0x540 fs/kernfs/file.c:352 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x629/0xba0 fs/read_write.c:688 ksys_write+0x156/0x270 fs/read_write.c:740 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556 insert_work+0x3d/0x330 kernel/workqueue.c:2226 __queue_work+0xbdb/0x1010 kernel/workqueue.c:2385 queue_work_on+0x106/0x1d0 kernel/workqueue.c:2432 queue_work include/linux/workqueue.h:698 [inline] udp_tunnel_nic_device_sync net/ipv4/udp_tunnel_nic.c:307 [inline] __udp_tunnel_nic_add_port+0xb71/0xd60 net/ipv4/udp_tunnel_nic.c:523 udp_tunnel_nic_add_port include/net/udp_tunnel.h:402 [inline] udp_tunnel_notify_add_rx_port+0x2c0/0x3c0 net/ipv4/udp_tunnel_core.c:146 geneve_socket_create drivers/net/geneve.c:998 [inline] geneve_sock_add+0x591/0xa40 drivers/net/geneve.c:1077 geneve_open+0x8c/0x140 drivers/net/geneve.c:1114 __dev_open+0x44d/0x830 net/core/dev.c:1702 __dev_change_flags+0x2fa/0x7e0 net/core/dev.c:9755 netif_change_flags+0x88/0x1a0 net/core/dev.c:9818 do_setlink+0xfa5/0x45a0 net/core/rtnetlink.c:3181 rtnl_changelink net/core/rtnetlink.c:3800 [inline] __rtnl_newlink net/core/rtnetlink.c:3973 [inline] rtnl_newlink+0x15ad/0x1bb0 net/core/rtnetlink.c:4110 rtnetlink_rcv_msg+0x7d5/0xbe0 net/core/rtnetlink.c:6996 netlink_rcv_skb+0x232/0x4b0 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x780/0x920 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1894 sock_sendmsg_nosec net/socket.c:787 [inline] __sock_sendmsg net/socket.c:802 [inline] __sys_sendto+0x67f/0x710 net/socket.c:2265 __do_sys_sendto net/socket.c:2272 [inline] __se_sys_sendto net/socket.c:2268 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2268 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Second to last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556 insert_work+0x3d/0x330 kernel/workqueue.c:2226 __queue_work+0xbdb/0x1010 kernel/workqueue.c:2385 queue_work_on+0x106/0x1d0 kernel/workqueue.c:2432 queue_work include/linux/workqueue.h:698 [inline] udp_tunnel_nic_device_sync net/ipv4/udp_tunnel_nic.c:307 [inline] __udp_tunnel_nic_add_port+0xb71/0xd60 net/ipv4/udp_tunnel_nic.c:523 udp_tunnel_nic_add_port include/net/udp_tunnel.h:402 [inline] udp_tunnel_notify_add_rx_port+0x2c0/0x3c0 net/ipv4/udp_tunnel_core.c:146 geneve_socket_create drivers/net/geneve.c:998 [inline] geneve_sock_add+0x591/0xa40 drivers/net/geneve.c:1077 geneve_open+0xd2/0x140 drivers/net/geneve.c:1120 __dev_open+0x44d/0x830 net/core/dev.c:1702 __dev_change_flags+0x2fa/0x7e0 net/core/dev.c:9755 netif_change_flags+0x88/0x1a0 net/core/dev.c:9818 do_setlink+0xfa5/0x45a0 net/core/rtnetlink.c:3181 rtnl_changelink net/core/rtnetlink.c:3800 [inline] __rtnl_newlink net/core/rtnetlink.c:3973 [inline] rtnl_newlink+0x15ad/0x1bb0 net/core/rtnetlink.c:4110 rtnetlink_rcv_msg+0x7d5/0xbe0 net/core/rtnetlink.c:6996 netlink_rcv_skb+0x232/0x4b0 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x780/0x920 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1894 sock_sendmsg_nosec net/socket.c:787 [inline] __sock_sendmsg net/socket.c:802 [inline] __sys_sendto+0x67f/0x710 net/socket.c:2265 __do_sys_sendto net/socket.c:2272 [inline] __se_sys_sendto net/socket.c:2268 [inline] __x64_sys_sendto+0xde/0x100 net/socket.c:2268 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888059c0ba00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 168 bytes inside of freed 256-byte region [ffff888059c0ba00, ffff888059c0bb00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x59c0a head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x80000000000040(head|node=0|zone=1) page_type: f5(slab) raw: 0080000000000040 ffff88801a010b40 dead000000000100 dead000000000122 raw: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000 head: 0080000000000040 ffff88801a010b40 dead000000000100 dead000000000122 head: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000 head: 0080000000000001 ffffffffffffff81 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5609, tgid 5609 (syz-executor), ts 85556114394, free_ts 85430002055 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x231/0x280 mm/page_alloc.c:1858 prep_new_page mm/page_alloc.c:1866 [inline] get_page_from_freelist+0x27c8/0x2840 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5226 alloc_slab_page mm/slub.c:3278 [inline] allocate_slab+0x77/0x660 mm/slub.c:3467 new_slab mm/slub.c:3525 [inline] refill_objects+0x33c/0x3d0 mm/slub.c:7255 refill_sheaf mm/slub.c:2816 [inline] __pcs_replace_empty_main+0x373/0x720 mm/slub.c:4651 alloc_from_pcs mm/slub.c:4749 [inline] slab_alloc_node mm/slub.c:4883 [inline] __kmalloc_cache_noprof+0x44e/0x690 mm/slub.c:5414 kmalloc_noprof include/linux/slab.h:950 [inline] kzalloc_noprof include/linux/slab.h:1188 [inline] kset_create lib/kobject.c:965 [inline] kset_create_and_add+0x5a/0x180 lib/kobject.c:1008 register_queue_kobjects net/core/net-sysfs.c:2091 [inline] netdev_register_kobject+0x1a2/0x310 net/core/net-sysfs.c:2347 register_netdevice+0x146d/0x1ed0 net/core/dev.c:11420 virt_wifi_newlink+0x3e8/0x820 drivers/net/wireless/virtual/virt_wifi.c:572 rtnl_newlink_create+0x329/0xb70 net/core/rtnetlink.c:3864 __rtnl_newlink net/core/rtnetlink.c:3995 [inline] rtnl_newlink+0x166a/0x1bb0 net/core/rtnetlink.c:4110 rtnetlink_rcv_msg+0x7d5/0xbe0 net/core/rtnetlink.c:6996 netlink_rcv_skb+0x232/0x4b0 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x780/0x920 net/netlink/af_netlink.c:1344 page last free pid 28 tgid 28 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1402 [inline] __free_frozen_pages+0xfa6/0x10f0 mm/page_alloc.c:2943 mm_free_pgd kernel/fork.c:587 [inline] __mmdrop+0xb1/0x6d0 kernel/fork.c:729 rcu_do_batch kernel/rcu/tree.c:2617 [inline] rcu_core kernel/rcu/tree.c:2869 [inline] rcu_cpu_kthread+0x99e/0x1470 kernel/rcu/tree.c:2957 smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff888059c0b980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888059c0ba00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888059c0ba80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888059c0bb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888059c0bb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================