================================================================== 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 ffff8881e0eff1c0 by task syz.2.2239/8090 CPU: 1 PID: 8090 Comm: syz.2.2239 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 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xa43/0x2660 kernel/exit.c:861 __do_sys_exit kernel/exit.c:953 [inline] __se_sys_exit kernel/exit.c:951 [inline] __x64_sys_exit+0x40/0x40 kernel/exit.c:951 do_syscall_64+0xcf/0x170 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7f41e641e969 Code: Bad RIP value. RSP: 002b:00007f41e4a86fe8 EFLAGS: 00000246 ORIG_RAX: 000000000000003c RAX: ffffffffffffffda RBX: 00007f41e6645fa0 RCX: 00007f41e641e969 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007f41e64a0ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f41e6645fa0 R15: 00007ffe3834e878 Allocated by task 7: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] __kasan_kmalloc+0x162/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 call_netdevice_notifiers_info net/core/dev.c:1670 [inline] call_netdevice_notifiers_extack net/core/dev.c:1682 [inline] call_netdevice_notifiers net/core/dev.c:1696 [inline] dev_close_many+0x2c4/0x440 net/core/dev.c:1439 rollback_registered_many+0x451/0xf40 net/core/dev.c:8627 unregister_netdevice_many+0x4b/0x290 net/core/dev.c:9805 ip_tunnel_delete_nets+0x343/0x390 net/ipv4/ip_tunnel.c:1129 ipgre_tap_exit_batch_net+0x22/0x30 net/ipv4/ip_gre.c:1709 ops_exit_list net/core/net_namespace.c:187 [inline] cleanup_net+0x5fd/0xb40 net/core/net_namespace.c:612 process_one_work+0x73b/0xcc0 kernel/workqueue.c:2290 worker_thread+0xa5c/0x13b0 kernel/workqueue.c:2436 kthread+0x31e/0x3a0 kernel/kthread.c:288 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:354 Freed by task 7: save_stack mm/kasan/common.c:70 [inline] set_track mm/kasan/common.c:78 [inline] kasan_set_free_info mm/kasan/common.c:345 [inline] __kasan_slab_free+0x1c3/0x280 mm/kasan/common.c:487 kasan_slab_free+0xe/0x10 mm/kasan/common.c:496 slab_free_hook mm/slub.c:1455 [inline] slab_free_freelist_hook+0xb7/0x180 mm/slub.c:1494 slab_free mm/slub.c:3080 [inline] kmem_cache_free+0x10c/0x2c0 mm/slub.c:3096 kfree_skbmem+0x10c/0x180 net/core/skbuff.c:654 __kfree_skb net/core/skbuff.c:690 [inline] consume_skb+0xb5/0x240 net/core/skbuff.c:849 netlink_broadcast_filtered+0x1198/0x1290 net/netlink/af_netlink.c:1516 netlink_broadcast net/netlink/af_netlink.c:1538 [inline] nlmsg_multicast include/net/netlink.h:968 [inline] nlmsg_notify+0xed/0x1b0 net/netlink/af_netlink.c:2510 rtnl_notify+0x9a/0xc0 net/core/rtnetlink.c:737 __neigh_notify+0xd3/0x130 net/core/neighbour.c:3385 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 call_netdevice_notifiers_info net/core/dev.c:1670 [inline] call_netdevice_notifiers_extack net/core/dev.c:1682 [inline] call_netdevice_notifiers net/core/dev.c:1696 [inline] dev_close_many+0x2c4/0x440 net/core/dev.c:1439 rollback_registered_many+0x451/0xf40 net/core/dev.c:8627 unregister_netdevice_many+0x4b/0x290 net/core/dev.c:9805 ip_tunnel_delete_nets+0x343/0x390 net/ipv4/ip_tunnel.c:1129 ipgre_tap_exit_batch_net+0x22/0x30 net/ipv4/ip_gre.c:1709 ops_exit_list net/core/net_namespace.c:187 [inline] cleanup_net+0x5fd/0xb40 net/core/net_namespace.c:612 process_one_work+0x73b/0xcc0 kernel/workqueue.c:2290 worker_thread+0xa5c/0x13b0 kernel/workqueue.c:2436 kthread+0x31e/0x3a0 kernel/kthread.c:288 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:354 The buggy address belongs to the object at ffff8881e0eff140 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 128 bytes inside of 240-byte region [ffff8881e0eff140, ffff8881e0eff230) The buggy address belongs to the page: page:ffffea000783bfc0 refcount:1 mapcount:0 mapping:ffff8881f1ccc280 index:0x0 flags: 0x8000000000000200(slab) raw: 8000000000000200 dead000000000100 dead000000000122 ffff8881f1ccc280 raw: 0000000000000000 00000000000c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__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_slab_page+0x3c/0x3b0 mm/slub.c:343 allocate_slab mm/slub.c:1683 [inline] new_slab+0x93/0x420 mm/slub.c:1749 new_slab_objects mm/slub.c:2505 [inline] ___slab_alloc+0x29e/0x420 mm/slub.c:2667 __slab_alloc+0x63/0xa0 mm/slub.c:2707 slab_alloc_node mm/slub.c:2792 [inline] slab_alloc mm/slub.c:2837 [inline] kmem_cache_alloc+0x12c/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] inet6_rt_notify+0x287/0x470 net/ipv6/route.c:5996 fib6_del_route net/ipv6/ip6_fib.c:1893 [inline] fib6_del+0x950/0xbe0 net/ipv6/ip6_fib.c:1926 fib6_clean_node+0x296/0x520 net/ipv6/ip6_fib.c:2088 fib6_walk_continue+0x4fc/0x700 net/ipv6/ip6_fib.c:2010 fib6_walk+0x151/0x280 net/ipv6/ip6_fib.c:2058 fib6_clean_tree net/ipv6/ip6_fib.c:2138 [inline] __fib6_clean_all net/ipv6/ip6_fib.c:2154 [inline] fib6_clean_all+0x174/0x230 net/ipv6/ip6_fib.c:2165 rt6_sync_down_dev net/ipv6/route.c:4784 [inline] rt6_disable_ip+0x119/0x6a0 net/ipv6/route.c:4789 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_pcp_prepare mm/page_alloc.c:1233 [inline] free_unref_page_prepare+0x2a9/0x3a0 mm/page_alloc.c:3085 free_unref_page_list+0x110/0x4c0 mm/page_alloc.c:3154 release_pages+0xa62/0xaa0 mm/swap.c:842 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:297 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:189 [inline] tlb_flush_mmu mm/mmu_gather.c:196 [inline] tlb_finish_mmu+0x175/0x300 mm/mmu_gather.c:277 exit_mmap+0x2db/0x520 mm/mmap.c:3193 __mmput+0x92/0x2e0 kernel/fork.c:1101 mmput+0x47/0x60 kernel/fork.c:1122 exit_mm kernel/exit.c:538 [inline] do_exit+0x99f/0x2660 kernel/exit.c:848 do_group_exit+0x13e/0x300 kernel/exit.c:984 get_signal+0xdee/0x13d0 kernel/signal.c:2738 do_signal+0xad/0xda0 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0xc4/0x1b0 arch/x86/entry/common.c:159 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 Memory state around the buggy address: ffff8881e0eff080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ffff8881e0eff100: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8881e0eff180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881e0eff200: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc ffff8881e0eff280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================