================================================================== BUG: KASAN: slab-use-after-free in find_endpoint+0x2a3/0x2c0 drivers/usb/gadget/udc/dummy_hcd.c:1650 Read of size 1 at addr ffff8880568a68e8 by task kworker/0:5/5754 CPU: 0 UID: 0 PID: 5754 Comm: kworker/0:5 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/15/2026 Workqueue: events hidinput_led_worker Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 find_endpoint+0x2a3/0x2c0 drivers/usb/gadget/udc/dummy_hcd.c:1650 dummy_timer+0x506/0x3840 drivers/usb/gadget/udc/dummy_hcd.c:1922 __run_hrtimer kernel/time/hrtimer.c:2079 [inline] __hrtimer_run_queues+0x448/0x9a0 kernel/time/hrtimer.c:2136 hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2153 handle_softirqs+0x216/0xa20 kernel/softirq.c:669 __do_softirq kernel/softirq.c:703 [inline] invoke_softirq kernel/softirq.c:542 [inline] __irq_exit_rcu+0x178/0x220 kernel/softirq.c:786 irq_exit_rcu+0x9/0x30 kernel/softirq.c:809 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline] sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1062 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:211 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x80 kernel/locking/spinlock.c:221 Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 c6 49 f7 f5 48 89 df e8 4e a0 f7 f5 f7 c5 00 02 00 00 75 23 9c 58 f6 c4 02 75 37 01 00 00 00 e8 f5 68 e6 f5 65 48 83 3d 84 92 c8 09 00 74 16 5b RSP: 0018:ffffc9000488fbb0 EFLAGS: 00000246 RAX: 0000000000000002 RBX: ffff88805611e910 RCX: 0000000000000040 RDX: 0000000000000001 RSI: ffffffff8e629422 RDI: ffffffff8c835880 RBP: 0000000000000246 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 000000000000777b R12: ffff88807dc18000 R13: 0000000000000246 R14: 0000000000000000 R15: ffff88813fe4a400 spin_unlock_irqrestore include/linux/spinlock.h:425 [inline] usbhid_submit_report drivers/hid/usbhid/hid-core.c:641 [inline] usbhid_request+0x88/0xf0 drivers/hid/usbhid/hid-core.c:1310 hidinput_led_worker+0xbf/0x270 drivers/hid/hid-input.c:1899 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3495 process_scheduled_works kernel/workqueue.c:3578 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3659 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 6871: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:351 [inline] __kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:377 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4720 [inline] slab_alloc_node mm/slub.c:5033 [inline] kmem_cache_alloc_node_noprof+0x282/0x6e0 mm/slub.c:5105 kmalloc_reserve+0x148/0x350 net/core/skbuff.c:616 __alloc_skb+0x185/0x710 net/core/skbuff.c:716 alloc_skb include/linux/skbuff.h:1390 [inline] alloc_skb_with_frags+0xdb/0x750 net/core/skbuff.c:6898 sock_alloc_send_pskb+0x86a/0x9e0 net/core/sock.c:3093 sock_alloc_send_skb include/net/sock.h:1911 [inline] __ip6_append_data+0x26e3/0x4b30 net/ipv6/ip6_output.c:1695 ip6_append_data net/ipv6/ip6_output.c:1891 [inline] ip6_append_data+0x10b/0x410 net/ipv6/ip6_output.c:1860 icmp6_send+0x1676/0x3d60 net/ipv6/icmp.c:818 icmpv6_send include/linux/icmpv6.h:24 [inline] ip6_link_failure+0x31/0x580 net/ipv6/route.c:2861 dst_link_failure include/net/dst.h:438 [inline] ip6_tnl_xmit+0x514/0x3670 net/ipv6/ip6_tunnel.c:1289 ipxip6_tnl_xmit net/ipv6/ip6_tunnel.c:1405 [inline] ip6_tnl_start_xmit+0x6c4/0x1790 net/ipv6/ip6_tunnel.c:1453 __netdev_start_xmit include/linux/netdevice.h:5457 [inline] netdev_start_xmit include/linux/netdevice.h:5466 [inline] xmit_one net/core/dev.c:4068 [inline] dev_hard_start_xmit+0x121/0x760 net/core/dev.c:4084 __dev_queue_xmit+0x1bef/0x48d0 net/core/dev.c:5088 dev_queue_xmit include/linux/netdevice.h:3485 [inline] neigh_connected_output+0x3b5/0x5d0 net/core/neighbour.c:1662 neigh_output include/net/neighbour.h:554 [inline] ip6_finish_output2+0xbd8/0x1f10 net/ipv6/ip6_output.c:138 __ip6_finish_output+0x34e/0xdf0 net/ipv6/ip6_output.c:210 ip6_finish_output net/ipv6/ip6_output.c:221 [inline] NF_HOOK_COND include/linux/netfilter.h:314 [inline] ip6_output+0x2a1/0xa50 net/ipv6/ip6_output.c:248 dst_output include/net/dst.h:471 [inline] ip6_local_out+0xcb/0x1f0 net/ipv6/output_core.c:128 ip6_send_skb+0x112/0x430 net/ipv6/ip6_output.c:2018 udp_v6_send_skb+0x9b0/0x1380 net/ipv6/udp.c:1433 udpv6_sendmsg+0x227d/0x2c20 net/ipv6/udp.c:1720 inet6_sendmsg+0x105/0x140 net/ipv6/af_inet6.c:638 sock_sendmsg_nosec net/socket.c:800 [inline] __sock_sendmsg net/socket.c:818 [inline] ____sys_sendmsg+0x6da/0xc30 net/socket.c:2715 ___sys_sendmsg+0x190/0x1e0 net/socket.c:2769 __sys_sendmmsg+0x20c/0x440 net/socket.c:2858 __do_sys_sendmmsg net/socket.c:2885 [inline] __se_sys_sendmmsg net/socket.c:2882 [inline] __x64_sys_sendmmsg+0x9c/0x100 net/socket.c:2882 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 6871: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:264 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:296 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2780 [inline] slab_free mm/slub.c:6630 [inline] kfree+0x22b/0x6d0 mm/slub.c:6923 skb_kfree_head net/core/skbuff.c:1084 [inline] skb_free_head+0xb9/0x160 net/core/skbuff.c:1096 skb_release_data+0x698/0x860 net/core/skbuff.c:1124 skb_release_all net/core/skbuff.c:1188 [inline] __kfree_skb net/core/skbuff.c:1202 [inline] sk_skb_reason_drop+0x102/0x1b0 net/core/skbuff.c:1241 kfree_skb_reason include/linux/skbuff.h:1329 [inline] icmpv6_rcv+0xe4f/0x1af0 net/ipv6/icmp.c:1236 ip6_protocol_deliver_rcu+0x1032/0x15c0 net/ipv6/ip6_input.c:479 ip6_input_finish+0x1db/0x4a0 net/ipv6/ip6_input.c:534 NF_HOOK include/linux/netfilter.h:325 [inline] NF_HOOK include/linux/netfilter.h:319 [inline] ip6_input+0x105/0x2f0 net/ipv6/ip6_input.c:545 dst_input include/net/dst.h:481 [inline] ip6_rcv_finish net/ipv6/ip6_input.c:119 [inline] NF_HOOK include/linux/netfilter.h:325 [inline] NF_HOOK include/linux/netfilter.h:319 [inline] ipv6_rcv+0x263/0x3d0 net/ipv6/ip6_input.c:351 __netif_receive_skb_one_core+0x12d/0x1e0 net/core/dev.c:6435 __netif_receive_skb+0x1f/0x120 net/core/dev.c:6548 process_backlog+0x487/0x1600 net/core/dev.c:6899 __napi_poll.constprop.0+0xaf/0x450 net/core/dev.c:7985 napi_poll net/core/dev.c:8048 [inline] net_rx_action+0xa40/0xf20 net/core/dev.c:8205 handle_softirqs+0x216/0xa20 kernel/softirq.c:669 do_softirq kernel/softirq.c:569 [inline] do_softirq+0xaf/0xf0 kernel/softirq.c:556 __local_bh_enable_ip+0xff/0x120 kernel/softirq.c:473 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:923 [inline] __dev_queue_xmit+0xa43/0x48d0 net/core/dev.c:5123 dev_queue_xmit include/linux/netdevice.h:3485 [inline] neigh_connected_output+0x3b5/0x5d0 net/core/neighbour.c:1662 neigh_output include/net/neighbour.h:554 [inline] ip6_finish_output2+0xbd8/0x1f10 net/ipv6/ip6_output.c:138 __ip6_finish_output+0x34e/0xdf0 net/ipv6/ip6_output.c:210 ip6_finish_output net/ipv6/ip6_output.c:221 [inline] NF_HOOK_COND include/linux/netfilter.h:314 [inline] ip6_output+0x2a1/0xa50 net/ipv6/ip6_output.c:248 dst_output include/net/dst.h:471 [inline] ip6_local_out+0xcb/0x1f0 net/ipv6/output_core.c:128 ip6_send_skb+0x112/0x430 net/ipv6/ip6_output.c:2018 udp_v6_send_skb+0x9b0/0x1380 net/ipv6/udp.c:1433 udpv6_sendmsg+0x227d/0x2c20 net/ipv6/udp.c:1720 inet6_sendmsg+0x105/0x140 net/ipv6/af_inet6.c:638 sock_sendmsg_nosec net/socket.c:800 [inline] __sock_sendmsg net/socket.c:818 [inline] ____sys_sendmsg+0x6da/0xc30 net/socket.c:2715 ___sys_sendmsg+0x190/0x1e0 net/socket.c:2769 __sys_sendmmsg+0x20c/0x440 net/socket.c:2858 __do_sys_sendmmsg net/socket.c:2885 [inline] __se_sys_sendmmsg net/socket.c:2882 [inline] __x64_sys_sendmmsg+0x9c/0x100 net/socket.c:2882 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880568a6700 which belongs to the cache skbuff_small_head of size 704 The buggy address is located 488 bytes inside of freed 704-byte region [ffff8880568a6700, ffff8880568a69c0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x568a4 head: order:2 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 ffff8881404fa8c0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000200130013 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff8881404fa8c0 dead000000000100 dead000000000122 head: 0000000000000000 0000000200130013 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffffffffffff01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 6889, tgid 6888 (syz.1.318), ts 204837715931 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859 prep_new_page mm/page_alloc.c:1867 [inline] get_page_from_freelist+0x112f/0x3640 mm/page_alloc.c:3940 __alloc_frozen_pages_noprof+0x2ad/0x31e0 mm/page_alloc.c:5464 alloc_slab_page mm/slub.c:3384 [inline] allocate_slab mm/slub.c:3499 [inline] new_slab+0xb1/0x6d0 mm/slub.c:3550 refill_objects+0xe3/0x410 mm/slub.c:7539 refill_sheaf mm/slub.c:2917 [inline] __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4811 alloc_from_pcs mm/slub.c:4887 [inline] slab_alloc_node mm/slub.c:5021 [inline] kmem_cache_alloc_node_noprof+0x4ed/0x6e0 mm/slub.c:5105 kmalloc_reserve+0x148/0x350 net/core/skbuff.c:616 __alloc_skb+0x185/0x710 net/core/skbuff.c:716 skb_copy+0x1c1/0x3b0 net/core/skbuff.c:2185 mac80211_hwsim_tx_frame_no_nl+0xc9c/0x1840 drivers/net/wireless/virtual/mac80211_hwsim_main.c:2027 mac80211_hwsim_tx_frame+0x1b7/0x250 drivers/net/wireless/virtual/mac80211_hwsim_main.c:2440 __mac80211_hwsim_beacon_tx drivers/net/wireless/virtual/mac80211_hwsim_main.c:2453 [inline] mac80211_hwsim_beacon_tx+0x56d/0xa00 drivers/net/wireless/virtual/mac80211_hwsim_main.c:2516 __iterate_interfaces+0x2e6/0x650 net/mac80211/util.c:775 ieee80211_iterate_active_interfaces_atomic+0x71/0x1b0 net/mac80211/util.c:811 mac80211_hwsim_beacon+0xe5/0x2a0 drivers/net/wireless/virtual/mac80211_hwsim_main.c:2548 page last free pid 6875 tgid 6875 ts 203286906936 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1403 [inline] __free_frozen_pages+0x7b4/0x1110 mm/page_alloc.c:2957 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:361 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4720 [inline] slab_alloc_node mm/slub.c:5033 [inline] kmem_cache_alloc_noprof+0x269/0x6a0 mm/slub.c:5047 alloc_filename fs/namei.c:147 [inline] do_getname+0x35/0x390 fs/namei.c:187 getname_flags fs/namei.c:230 [inline] getname include/linux/fs.h:2566 [inline] class_filename_constructor include/linux/fs.h:2593 [inline] __do_sys_symlinkat fs/namei.c:5856 [inline] __se_sys_symlinkat fs/namei.c:5852 [inline] __x64_sys_symlinkat+0x8b/0xe0 fs/namei.c:5852 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff8880568a6780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880568a6800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880568a6880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880568a6900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880568a6980: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: f5 cmc 1: 53 push %rbx 2: 48 8b 74 24 10 mov 0x10(%rsp),%rsi 7: 48 89 fb mov %rdi,%rbx a: 48 83 c7 18 add $0x18,%rdi e: e8 c6 49 f7 f5 call 0xf5f749d9 13: 48 89 df mov %rbx,%rdi 16: e8 4e a0 f7 f5 call 0xf5f7a069 1b: f7 c5 00 02 00 00 test $0x200,%ebp 21: 75 23 jne 0x46 23: 9c pushf 24: 58 pop %rax 25: f6 c4 02 test $0x2,%ah 28: 75 37 jne 0x61 * 2a: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction 2f: e8 f5 68 e6 f5 call 0xf5e66929 34: 65 48 83 3d 84 92 c8 cmpq $0x0,%gs:0x9c89284(%rip) # 0x9c892c1 3b: 09 00 3d: 74 16 je 0x55 3f: 5b pop %rbx