================================================================== BUG: KASAN: slab-use-after-free in mini_qdisc_pair_swap+0x174/0x190 net/sched/sch_generic.c:1618 Write of size 8 at addr ffff8880266df2c8 by task syz.2.5341/32287 CPU: 0 UID: 0 PID: 32287 Comm: syz.2.5341 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 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 mini_qdisc_pair_swap+0x174/0x190 net/sched/sch_generic.c:1618 tcf_chain_head_change_item net/sched/cls_api.c:537 [inline] tcf_chain0_head_change net/sched/cls_api.c:551 [inline] tcf_chain_tp_insert net/sched/cls_api.c:1922 [inline] tcf_chain_tp_insert_unique+0x76a/0x970 net/sched/cls_api.c:1971 tc_new_tfilter+0x13d1/0x1810 net/sched/cls_api.c:2405 rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7132 netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x7bd/0x940 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900 sock_sendmsg_nosec+0x13a/0x180 net/socket.c:800 __sock_sendmsg net/socket.c:815 [inline] ____sys_sendmsg+0x54e/0x850 net/socket.c:2713 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2767 __sys_sendmsg net/socket.c:2799 [inline] __do_sys_sendmsg net/socket.c:2804 [inline] __se_sys_sendmsg net/socket.c:2802 [inline] __x64_sys_sendmsg+0x1b1/0x290 net/socket.c:2802 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1ed4d9e159 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1ed5b9c028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f1ed5026270 RCX: 00007f1ed4d9e159 RDX: 0000000000000000 RSI: 0000200000000000 RDI: 000000000000000c RBP: 00007f1ed4e3503b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f1ed5026308 R14: 00007f1ed5026270 R15: 00007ffff142b118 Allocated by task 30765: 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:5414 [inline] __kmalloc_node_noprof+0x4b9/0x720 mm/slub.c:5426 _kmalloc_node_noprof include/linux/slab.h:1200 [inline] qdisc_alloc+0x92/0x9d0 net/sched/sch_generic.c:998 qdisc_create+0x12c/0xf00 net/sched/sch_api.c:1293 __tc_modify_qdisc net/sched/sch_api.c:1766 [inline] tc_modify_qdisc+0x18cc/0x2390 net/sched/sch_api.c:1847 rtnetlink_rcv_msg+0x7b9/0xc00 net/core/rtnetlink.c:7141 netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x7bd/0x940 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900 sock_sendmsg_nosec+0x13a/0x180 net/socket.c:800 __sock_sendmsg net/socket.c:815 [inline] ____sys_sendmsg+0x54e/0x850 net/socket.c:2713 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2767 __sys_sendmsg net/socket.c:2799 [inline] __do_sys_sendmsg net/socket.c:2804 [inline] __se_sys_sendmsg net/socket.c:2802 [inline] __x64_sys_sendmsg+0x1b1/0x290 net/socket.c:2802 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 15: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x40/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:2748 [inline] slab_free mm/slub.c:6499 [inline] kfree+0x1c5/0x650 mm/slub.c:6792 rcu_do_batch kernel/rcu/tree.c:2650 [inline] rcu_core+0x926/0x1260 kernel/rcu/tree.c:2919 handle_softirqs+0x226/0x860 kernel/softirq.c:645 __do_softirq kernel/softirq.c:679 [inline] invoke_softirq kernel/softirq.c:519 [inline] __irq_exit_rcu+0xcb/0x220 kernel/softirq.c:758 irq_exit_rcu+0x9/0x30 kernel/softirq.c:775 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1062 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674 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 __call_rcu_common kernel/rcu/tree.c:3181 [inline] call_rcu+0xee/0x8b0 kernel/rcu/tree.c:3301 qdisc_graft+0xcdd/0x1810 net/sched/sch_api.c:1171 __tc_modify_qdisc net/sched/sch_api.c:1791 [inline] tc_modify_qdisc+0x1968/0x2390 net/sched/sch_api.c:1847 rtnetlink_rcv_msg+0x7b9/0xc00 net/core/rtnetlink.c:7141 netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2556 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x7bd/0x940 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900 sock_sendmsg_nosec+0x13a/0x180 net/socket.c:800 __sock_sendmsg net/socket.c:815 [inline] ____sys_sendmsg+0x54e/0x850 net/socket.c:2713 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2767 __sys_sendmsg net/socket.c:2799 [inline] __do_sys_sendmsg net/socket.c:2804 [inline] __se_sys_sendmsg net/socket.c:2802 [inline] __x64_sys_sendmsg+0x1b1/0x290 net/socket.c:2802 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880266df000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 712 bytes inside of freed 1024-byte region [ffff8880266df000, ffff8880266df400) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880266d9000 pfn:0x266d8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801b041dc0 ffffea00014c9a10 ffffea0000b3ce10 raw: ffff8880266d9000 000000000010000b 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801b041dc0 ffffea00014c9a10 ffffea0000b3ce10 head: ffff8880266d9000 000000000010000b 00000000f5000000 0000000000000000 head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 20182, tgid 20181 (syz.9.3131), ts 707092443492 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x2209/0x2280 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x217/0x5a0 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3347 [inline] allocate_slab+0x7d/0x620 mm/slub.c:3462 new_slab mm/slub.c:3513 [inline] refill_objects+0x2d5/0x350 mm/slub.c:7410 refill_sheaf mm/slub.c:2885 [inline] __pcs_replace_empty_main+0x2c8/0x6c0 mm/slub.c:4774 alloc_from_pcs mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:4984 [inline] __do_kmalloc_node mm/slub.c:5413 [inline] __kmalloc_node_track_caller_noprof+0x548/0x720 mm/slub.c:5545 kmalloc_reserve net/core/skbuff.c:637 [inline] pskb_expand_head+0x22c/0x13a0 net/core/skbuff.c:2315 __skb_cow include/linux/skbuff.h:3909 [inline] skb_cow_head include/linux/skbuff.h:3943 [inline] ip_tunnel_xmit+0x1806/0x2040 net/ipv4/ip_tunnel.c:839 __gre_xmit net/ipv4/ip_gre.c:488 [inline] ipgre_xmit+0x8d2/0xcb0 net/ipv4/ip_gre.c:694 __netdev_start_xmit include/linux/netdevice.h:5429 [inline] netdev_start_xmit include/linux/netdevice.h:5438 [inline] xmit_one net/core/dev.c:3937 [inline] dev_hard_start_xmit+0x2cd/0x830 net/core/dev.c:3953 __dev_queue_xmit+0x14c0/0x3820 net/core/dev.c:4926 dev_queue_xmit include/linux/netdevice.h:3461 [inline] __bpf_tx_skb net/core/filter.c:2160 [inline] __bpf_redirect_no_mac net/core/filter.c:2190 [inline] __bpf_redirect+0xa76/0x1250 net/core/filter.c:2213 ____bpf_clone_redirect net/core/filter.c:2501 [inline] bpf_clone_redirect+0x319/0x4b0 net/core/filter.c:2464 0xffffffffa0401be7 bpf_dispatcher_nop_func include/linux/bpf.h:1468 [inline] __bpf_prog_run include/linux/filter.h:779 [inline] bpf_prog_run include/linux/filter.h:786 [inline] bpf_test_run+0x354/0x830 net/bpf/test_run.c:422 page last free pid 16734 tgid 16734 ts 705838170415 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] __free_frozen_pages+0xc93/0xd90 mm/page_alloc.c:2962 __slab_free+0x274/0x2c0 mm/slub.c:5815 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x99/0x100 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4683 [inline] slab_alloc_node mm/slub.c:4996 [inline] kmem_cache_alloc_node_noprof+0x354/0x610 mm/slub.c:5068 __alloc_skb+0x1db/0x7a0 net/core/skbuff.c:704 alloc_skb include/linux/skbuff.h:1384 [inline] nlmsg_new include/net/netlink.h:1055 [inline] rtmsg_ifa+0xf8/0x1f0 net/ipv4/devinet.c:2014 __inet_del_ifa+0xa55/0x1040 net/ipv4/devinet.c:449 inet_del_ifa net/ipv4/devinet.c:487 [inline] inetdev_destroy net/ipv4/devinet.c:330 [inline] inetdev_event+0x64b/0x15e0 net/ipv4/devinet.c:1655 notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2313 [inline] call_netdevice_notifiers net/core/dev.c:2327 [inline] unregister_netdevice_many_notify+0x17f9/0x2140 net/core/dev.c:12518 ops_exit_rtnl_list net/core/net_namespace.c:188 [inline] ops_undo_list+0x391/0x8d0 net/core/net_namespace.c:249 cleanup_net+0x572/0x810 net/core/net_namespace.c:706 process_one_work kernel/workqueue.c:3396 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3479 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3560 Memory state around the buggy address: ffff8880266df180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880266df200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880266df280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880266df300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880266df380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================