netdevsim netdevsim2 netdevsim1 (unregistering): unset [1, 1] type 2 family 0 port 48858 - 0 ================================================================== BUG: KASAN: slab-use-after-free in mini_qdisc_pair_swap+0x68/0x190 net/sched/sch_generic.c:1566 Read of size 8 at addr ffff8880555d3000 by task syz.2.5898/27827 CPU: 1 UID: 0 PID: 27827 Comm: syz.2.5898 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 mini_qdisc_pair_swap+0x68/0x190 net/sched/sch_generic.c:1566 tcf_chain_head_change_item net/sched/cls_api.c:522 [inline] tcf_chain0_head_change_cb_del+0x24c/0x380 net/sched/cls_api.c:969 tcf_block_put_ext+0x129/0x390 net/sched/cls_api.c:1559 clsact_destroy+0x25e/0x820 net/sched/sch_ingress.c:302 __qdisc_destroy+0x153/0x450 net/sched/sch_generic.c:1075 dev_shutdown+0x233/0x440 net/sched/sch_generic.c:1490 unregister_netdevice_many_notify+0x11a9/0x2370 net/core/dev.c:12391 unregister_netdevice_many net/core/dev.c:12466 [inline] unregister_netdevice_queue+0x31f/0x360 net/core/dev.c:12280 unregister_netdevice include/linux/netdevice.h:3408 [inline] nsim_destroy+0x1e5/0x680 drivers/net/netdevsim/netdev.c:1183 __nsim_dev_port_del+0x14d/0x1b0 drivers/net/netdevsim/dev.c:1528 nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1540 [inline] nsim_dev_reload_destroy+0x288/0x490 drivers/net/netdevsim/dev.c:1764 nsim_dev_reload_down+0x8a/0xc0 drivers/net/netdevsim/dev.c:1038 devlink_reload+0x1d1/0x8d0 net/devlink/dev.c:461 devlink_nl_reload_doit+0x9d4/0xc80 net/devlink/dev.c:584 genl_family_rcv_msg_doit+0x22a/0x330 net/netlink/genetlink.c:1115 genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0x61c/0x7a0 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x232/0x4b0 net/netlink/af_netlink.c:2550 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x80f/0x9b0 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1894 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg net/socket.c:742 [inline] ____sys_sendmsg+0xa68/0xad0 net/socket.c:2592 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2646 __sys_sendmsg net/socket.c:2678 [inline] __do_sys_sendmsg net/socket.c:2683 [inline] __se_sys_sendmsg net/socket.c:2681 [inline] __x64_sys_sendmsg+0x1bd/0x2a0 net/socket.c:2681 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb49059c629 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:00007fb49143a028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fb490816180 RCX: 00007fb49059c629 RDX: 0000000000000030 RSI: 00002000000003c0 RDI: 0000000000000008 RBP: 00007fb490632b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fb490816218 R14: 00007fb490816180 R15: 00007ffd097221e8 Allocated by task 27146: 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:5177 [inline] __kmalloc_noprof+0x35c/0x760 mm/slub.c:5189 kmalloc_noprof include/linux/slab.h:966 [inline] sk_prot_alloc+0xe7/0x210 net/core/sock.c:2245 sk_alloc+0x3a/0x390 net/core/sock.c:2301 __netlink_create+0x65/0x260 net/netlink/af_netlink.c:626 netlink_create+0x3ca/0x590 net/netlink/af_netlink.c:684 __sock_create+0x4b2/0x9d0 net/socket.c:1605 sock_create net/socket.c:1663 [inline] __sys_socket_create net/socket.c:1700 [inline] __sys_socket+0xd6/0x1b0 net/socket.c:1747 __do_sys_socket net/socket.c:1761 [inline] __se_sys_socket net/socket.c:1759 [inline] __x64_sys_socket+0x7a/0x90 net/socket.c:1759 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 1206: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x46/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:2670 [inline] slab_free mm/slub.c:6082 [inline] kfree+0x1c1/0x610 mm/slub.c:6399 sk_prot_free net/core/sock.c:2284 [inline] __sk_destruct+0x623/0x880 net/core/sock.c:2384 rcu_do_batch kernel/rcu/tree.c:2617 [inline] rcu_core+0x7cd/0x1070 kernel/rcu/tree.c:2869 handle_softirqs+0x22a/0x7c0 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x5f/0x150 kernel/softirq.c:723 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 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:3131 [inline] call_rcu+0xee/0x890 kernel/rcu/tree.c:3251 netlink_release+0x1709/0x1ad0 net/netlink/af_netlink.c:796 __sock_release net/socket.c:662 [inline] sock_close+0xc3/0x240 net/socket.c:1455 __fput+0x44f/0xa70 fs/file_table.c:469 task_work_run+0x1d9/0x270 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:67 [inline] exit_to_user_mode_loop+0xed/0x480 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline] do_syscall_64+0x32d/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880555d3000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 0 bytes inside of freed 2048-byte region [ffff8880555d3000, ffff8880555d3800) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x555d0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88813fe9b000 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88813fe9b000 dead000000000100 dead000000000122 head: 0000000000000000 0000000000080008 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea0001557401 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 0xd28c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 10934, tgid 10931 (syz.1.1322), ts 203876946621, free_ts 203858993851 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x228/0x280 mm/page_alloc.c:1884 prep_new_page mm/page_alloc.c:1892 [inline] get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3950 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5245 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3236 [inline] allocate_slab+0x83/0x660 mm/slub.c:3411 new_slab mm/slub.c:3469 [inline] ___slab_alloc+0x150/0x6a0 mm/slub.c:4334 __slab_alloc_node mm/slub.c:4400 [inline] slab_alloc_node mm/slub.c:4776 [inline] __do_kmalloc_node mm/slub.c:5176 [inline] __kmalloc_node_track_caller_noprof+0x304/0x7b0 mm/slub.c:5285 kmalloc_reserve net/core/skbuff.c:635 [inline] pskb_expand_head+0x228/0x1320 net/core/skbuff.c:2315 netlink_trim+0x1b3/0x2c0 net/netlink/af_netlink.c:1299 netlink_broadcast_filtered+0xd6/0x1020 net/netlink/af_netlink.c:1512 nlmsg_multicast_filtered include/net/netlink.h:1165 [inline] nlmsg_multicast include/net/netlink.h:1184 [inline] nlmsg_notify+0xf0/0x1a0 net/netlink/af_netlink.c:2593 register_netdevice+0x1952/0x1cf0 net/core/dev.c:11465 tun_set_iff+0x844/0xf00 drivers/net/tun.c:2807 __tun_chr_ioctl+0x7bb/0x1e10 drivers/net/tun.c:3088 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 page last free pid 15 tgid 15 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0xbf8/0xd70 mm/page_alloc.c:2973 __folio_put+0x414/0x4f0 mm/swap.c:112 page_to_skb+0x704/0x870 drivers/net/virtio_net.c:928 receive_mergeable drivers/net/virtio_net.c:2497 [inline] receive_buf+0x546/0x1900 drivers/net/virtio_net.c:2643 virtnet_receive_packets drivers/net/virtio_net.c:2970 [inline] virtnet_receive drivers/net/virtio_net.c:2994 [inline] virtnet_poll+0x21f0/0x2fe0 drivers/net/virtio_net.c:3083 __napi_poll+0xae/0x340 net/core/dev.c:7685 napi_poll net/core/dev.c:7748 [inline] net_rx_action+0x627/0xf70 net/core/dev.c:7900 handle_softirqs+0x22a/0x7c0 kernel/softirq.c:622 run_ksoftirqd+0x36/0x60 kernel/softirq.c:1063 smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160 kthread+0x388/0x470 kernel/kthread.c:467 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Memory state around the buggy address: ffff8880555d2f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880555d2f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880555d3000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880555d3080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880555d3100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================