================================================================== BUG: KASAN: use-after-free in netdev_need_ops_lock include/net/netdev_lock.h:30 [inline] BUG: KASAN: use-after-free in netdev_unlock_ops include/net/netdev_lock.h:47 [inline] BUG: KASAN: use-after-free in __linkwatch_run_queue+0x5b6/0x7e0 net/core/link_watch.c:245 Read of size 8 at addr ffff88802f2e8b80 by task kworker/u8:2/36 CPU: 1 UID: 0 PID: 36 Comm: kworker/u8:2 Not tainted 6.16.0-syzkaller-12084-g33caa208dba6 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Workqueue: events_unbound linkwatch_event Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 netdev_need_ops_lock include/net/netdev_lock.h:30 [inline] netdev_unlock_ops include/net/netdev_lock.h:47 [inline] __linkwatch_run_queue+0x5b6/0x7e0 net/core/link_watch.c:245 linkwatch_event+0x4c/0x60 net/core/link_watch.c:304 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802f2e9a00 pfn:0x2f2e8 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff88802f2e9a00 0000000000000000 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 0x92820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_NOMEMALLOC), pid 5852, tgid 5852 (syz-executor), ts 109571999218, free_ts 109522364984 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 alloc_frozen_pages_noprof mm/mempolicy.c:2487 [inline] alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2507 stack_depot_save_flags+0x777/0x860 lib/stackdepot.c:677 kasan_save_stack mm/kasan/common.c:48 [inline] kasan_save_track+0x4f/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:330 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:356 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_node_noprof+0x1bb/0x3c0 mm/slub.c:4281 __alloc_skb+0x112/0x2d0 net/core/skbuff.c:659 __netdev_alloc_skb+0x108/0x970 net/core/skbuff.c:733 netdev_alloc_skb include/linux/skbuff.h:3437 [inline] dev_alloc_skb include/linux/skbuff.h:3450 [inline] __ieee80211_beacon_get+0xc06/0x1880 net/mac80211/tx.c:5555 ieee80211_beacon_get_tim+0xb4/0x2b0 net/mac80211/tx.c:5677 ieee80211_beacon_get include/net/mac80211.h:5663 [inline] mac80211_hwsim_beacon_tx+0x3ce/0x860 drivers/net/wireless/virtual/mac80211_hwsim.c:2319 __iterate_interfaces+0x2ab/0x590 net/mac80211/util.c:761 ieee80211_iterate_active_interfaces_atomic+0xdb/0x180 net/mac80211/util.c:797 page last free pid 6511 tgid 6505 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2895 free_large_kmalloc+0x13a/0x1f0 mm/slub.c:4805 device_release+0x99/0x1c0 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x22b/0x480 lib/kobject.c:737 netdev_run_todo+0xd2e/0xea0 net/core/dev.c:11496 tun_detach drivers/net/tun.c:640 [inline] tun_chr_close+0x13c/0x1c0 drivers/net/tun.c:3433 __fput+0x44c/0xa70 fs/file_table.c:468 task_work_run+0x1d4/0x260 kernel/task_work.c:227 get_signal+0x11ed/0x1340 kernel/signal.c:2807 arch_do_signal_or_restart+0x9a/0x750 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop+0x75/0x110 kernel/entry/common.c:40 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline] do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff88802f2e8a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802f2e8b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802f2e8b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88802f2e8c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802f2e8c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================