================================================================== BUG: KASAN: use-after-free in __write_once_size include/linux/compiler.h:295 [inline] BUG: KASAN: use-after-free in __hlist_del include/linux/list.h:789 [inline] BUG: KASAN: use-after-free in detach_timer kernel/time/timer.c:824 [inline] BUG: KASAN: use-after-free in detach_if_pending+0x12d/0x330 kernel/time/timer.c:841 Write of size 8 at addr ffff8881eef431c0 by task syz.3.92/648 CPU: 0 PID: 648 Comm: syz.3.92 Not tainted 5.4.292-syzkaller-00021-gcd8e74fa0fa3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack+0x1e/0x20 lib/dump_stack.c:77 dump_stack+0x15b/0x1b8 lib/dump_stack.c:118 print_address_description+0x8d/0x4c0 mm/kasan/report.c:384 __kasan_report+0xef/0x120 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:653 __asan_report_store8_noabort+0x17/0x20 mm/kasan/generic_report.c:137 __write_once_size include/linux/compiler.h:295 [inline] __hlist_del include/linux/list.h:789 [inline] detach_timer kernel/time/timer.c:824 [inline] detach_if_pending+0x12d/0x330 kernel/time/timer.c:841 try_to_del_timer_sync kernel/time/timer.c:1267 [inline] del_timer_sync+0x136/0x1a0 kernel/time/timer.c:1410 tun_flow_uninit+0x2f/0x2b0 drivers/net/tun.c:1452 tun_free_netdev+0x7a/0x1b0 drivers/net/tun.c:2404 netdev_run_todo+0xa45/0xc70 net/core/dev.c:9477 rtnl_unlock+0xe/0x10 net/core/rtnetlink.c:112 tun_detach drivers/net/tun.c:766 [inline] tun_chr_close+0xc4/0x140 drivers/net/tun.c:3563 __fput+0x2a3/0x730 fs/file_table.c:281 ____fput+0x15/0x20 fs/file_table.c:314 task_work_run+0x146/0x170 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x195/0x1b0 arch/x86/entry/common.c:163 prepare_exit_to_usermode+0x18e/0x1f0 arch/x86/entry/common.c:194 syscall_return_slowpath arch/x86/entry/common.c:274 [inline] do_syscall_64+0x13e/0x170 arch/x86/entry/common.c:300 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7f906ede45ca Code: 48 3d 00 f0 ff ff 77 48 c3 0f 1f 80 00 00 00 00 48 83 ec 18 89 7c 24 0c e8 43 91 02 00 8b 7c 24 0c 89 c2 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 36 89 d7 89 44 24 0c e8 a3 91 02 00 8b 44 24 RSP: 002b:00007fffcd7a1340 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f906ede45ca RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007f906f00eba0 R08: 0000000000012798 R09: 0000001ecd7a164f R10: 00000000005ed3b4 R11: 0000000000000293 R12: 0000000000009f24 R13: 00007fffcd7a1450 R14: ffffffffffffffff R15: 00007fffcd7a1470 The buggy address belongs to the page: page:ffffea0007bbd0c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 2, migratetype Unmovable, gfp_mask 0x102a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_HARDWALL) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x35e/0x370 mm/page_alloc.c:2171 get_page_from_freelist+0x1296/0x1310 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x202/0x4b0 mm/page_alloc.c:4894 __alloc_pages include/linux/gfp.h:503 [inline] __alloc_pages_node include/linux/gfp.h:516 [inline] alloc_pages_node include/linux/gfp.h:530 [inline] stack_depot_save+0x3a3/0x4c0 lib/stackdepot.c:267 save_stack mm/kasan/common.c:72 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x1c3/0x200 mm/kasan/common.c:529 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:537 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2829 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0xe2/0x270 mm/slub.c:2842 kmem_cache_alloc_node include/linux/slab.h:427 [inline] __alloc_skb+0x9e/0x500 net/core/skbuff.c:198 alloc_skb include/linux/skbuff.h:1080 [inline] nlmsg_new include/net/netlink.h:888 [inline] __neigh_notify+0x84/0x130 net/core/neighbour.c:3374 neigh_cleanup_and_release+0x30/0x200 net/core/neighbour.c:102 neigh_flush_dev+0x61e/0x810 net/core/neighbour.c:375 __neigh_ifdown+0x3f/0x380 net/core/neighbour.c:392 neigh_ifdown+0x1f/0x30 net/core/neighbour.c:409 rt6_disable_ip+0x61e/0x6a0 net/ipv6/route.c:4791 addrconf_ifdown+0x164/0x17e0 net/ipv6/addrconf.c:3775 addrconf_notify+0x399/0xeb0 net/ipv6/addrconf.c:3698 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1176 [inline] __free_pages_ok+0x7e4/0x910 mm/page_alloc.c:1438 free_the_page mm/page_alloc.c:4956 [inline] __free_pages mm/page_alloc.c:4962 [inline] free_pages+0xf9/0x180 mm/page_alloc.c:4970 stack_depot_save+0x492/0x4c0 lib/stackdepot.c:300 save_stack mm/kasan/common.c:72 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x1c3/0x200 mm/kasan/common.c:529 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:537 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slub.c:2829 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0xe2/0x270 mm/slub.c:2842 kmem_cache_alloc_node include/linux/slab.h:427 [inline] __alloc_skb+0x9e/0x500 net/core/skbuff.c:198 alloc_skb include/linux/skbuff.h:1080 [inline] nlmsg_new include/net/netlink.h:888 [inline] __neigh_notify+0x84/0x130 net/core/neighbour.c:3374 neigh_cleanup_and_release+0x30/0x200 net/core/neighbour.c:102 neigh_flush_dev+0x61e/0x810 net/core/neighbour.c:375 __neigh_ifdown+0x3f/0x380 net/core/neighbour.c:392 neigh_ifdown+0x1f/0x30 net/core/neighbour.c:409 rt6_disable_ip+0x61e/0x6a0 net/ipv6/route.c:4791 addrconf_ifdown+0x164/0x17e0 net/ipv6/addrconf.c:3775 addrconf_notify+0x399/0xeb0 net/ipv6/addrconf.c:3698 notifier_call_chain kernel/notifier.c:98 [inline] __raw_notifier_call_chain kernel/notifier.c:399 [inline] raw_notifier_call_chain+0xa0/0x120 kernel/notifier.c:406 Memory state around the buggy address: ffff8881eef43080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881eef43100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8881eef43180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881eef43200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881eef43280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================