================================================================== BUG: KASAN: use-after-free in tcx_entry include/net/tcx.h:36 [inline] BUG: KASAN: use-after-free in tcx_miniq_set_active include/net/tcx.h:136 [inline] BUG: KASAN: use-after-free in ingress_destroy+0x4d4/0x520 net/sched/sch_ingress.c:124 Read of size 8 at addr ffff888043ae1208 by task kworker/u4:19/6554 CPU: 0 PID: 6554 Comm: kworker/u4:19 Not tainted 6.5.0-rc1-syzkaller-00458-g03b123debcbc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 tcx_entry include/net/tcx.h:36 [inline] tcx_miniq_set_active include/net/tcx.h:136 [inline] ingress_destroy+0x4d4/0x520 net/sched/sch_ingress.c:124 __qdisc_destroy+0xc4/0x450 net/sched/sch_generic.c:1063 qdisc_put+0xd1/0xf0 net/sched/sch_generic.c:1090 shutdown_scheduler_queue+0xa5/0x160 net/sched/sch_generic.c:1143 dev_shutdown+0x17e/0x430 net/sched/sch_generic.c:1477 unregister_netdevice_many_notify+0x5bd/0x1a20 net/core/dev.c:10898 unregister_netdevice_many net/core/dev.c:10964 [inline] default_device_exit_batch+0x584/0x740 net/core/dev.c:11417 ops_exit_list+0x125/0x170 net/core/net_namespace.c:175 cleanup_net+0x505/0xb20 net/core/net_namespace.c:614 process_one_work+0xaa2/0x16f0 kernel/workqueue.c:2597 worker_thread+0x687/0x1110 kernel/workqueue.c:2748 kthread+0x33a/0x430 kernel/kthread.c:389 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the physical page: page:ffffea00010eb840 refcount:0 mapcount:0 mapping:0000000000000000 index:0x8 pfn:0x43ae1 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 0000000000000000 ffffffff00000301 0000000000000000 raw: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 4478, tgid 4478 (udevd), ts 573831426968, free_ts 582908358964 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d2/0x350 mm/page_alloc.c:1570 prep_new_page mm/page_alloc.c:1577 [inline] get_page_from_freelist+0x10a9/0x31e0 mm/page_alloc.c:3221 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4477 alloc_pages+0x1a9/0x270 mm/mempolicy.c:2279 alloc_slab_page mm/slub.c:1862 [inline] allocate_slab+0x24e/0x380 mm/slub.c:2009 new_slab mm/slub.c:2062 [inline] ___slab_alloc+0x8bc/0x1570 mm/slub.c:3215 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3314 __slab_alloc_node mm/slub.c:3367 [inline] slab_alloc_node mm/slub.c:3460 [inline] slab_alloc mm/slub.c:3478 [inline] __kmem_cache_alloc_lru mm/slub.c:3485 [inline] kmem_cache_alloc+0x392/0x3b0 mm/slub.c:3494 getname_flags.part.0+0x50/0x4d0 fs/namei.c:140 getname_flags+0x9c/0xf0 include/linux/audit.h:319 vfs_fstatat+0x77/0xb0 fs/stat.c:275 __do_sys_newfstatat+0x98/0x110 fs/stat.c:446 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1161 [inline] free_unref_page_prepare+0x508/0xb90 mm/page_alloc.c:2348 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2443 __unfreeze_partials+0x21d/0x240 mm/slub.c:2647 qlink_free mm/kasan/quarantine.c:166 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x18b/0x1d0 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook mm/slab.h:762 [inline] slab_alloc_node mm/slub.c:3470 [inline] kmem_cache_alloc_node+0x185/0x3f0 mm/slub.c:3515 __alloc_skb+0x287/0x330 net/core/skbuff.c:634 alloc_skb include/linux/skbuff.h:1289 [inline] nlmsg_new include/net/netlink.h:1003 [inline] inet_netconf_notify_devconf+0x8b/0x1f0 net/ipv4/devinet.c:2105 __devinet_sysctl_unregister net/ipv4/devinet.c:2617 [inline] devinet_sysctl_unregister net/ipv4/devinet.c:2641 [inline] inetdev_destroy net/ipv4/devinet.c:328 [inline] inetdev_event+0x13a3/0x1900 net/ipv4/devinet.c:1606 notifier_call_chain+0xb6/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xb9/0x130 net/core/dev.c:1962 call_netdevice_notifiers_extack net/core/dev.c:2000 [inline] call_netdevice_notifiers net/core/dev.c:2014 [inline] unregister_netdevice_many_notify+0x85f/0x1a20 net/core/dev.c:10908 ip_tunnel_delete_nets+0x2bb/0x3a0 net/ipv4/ip_tunnel.c:1144 ops_exit_list+0x125/0x170 net/core/net_namespace.c:175 cleanup_net+0x505/0xb20 net/core/net_namespace.c:614 Memory state around the buggy address: ffff888043ae1100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888043ae1180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888043ae1200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888043ae1280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888043ae1300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================