xpad 2-1:179.65: xpad_irq_in - usb_submit_urb failed with result -19 xpad 2-1:179.65: xpad_irq_out - usb_submit_urb failed with result -19 ================================================================== BUG: KASAN: slab-use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x23d/0x290 kernel/locking/spinlock_debug.c:115 Read of size 4 at addr ffff88807835685c by task udevd/5197 CPU: 0 UID: 0 PID: 5197 Comm: udevd Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline] do_raw_spin_lock+0x23d/0x290 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0xb3/0xf0 kernel/locking/spinlock.c:162 __wake_up_common_lock+0x2f/0x1f0 kernel/sched/wait.c:124 __usb_hcd_giveback_urb+0x3b0/0x540 drivers/usb/core/hcd.c:1664 dummy_timer+0x85f/0x45b0 drivers/usb/gadget/udc/dummy_hcd.c:1995 __run_hrtimer kernel/time/hrtimer.c:1777 [inline] __hrtimer_run_queues+0x51c/0xc30 kernel/time/hrtimer.c:1841 hrtimer_run_softirq+0x187/0x2b0 kernel/time/hrtimer.c:1858 handle_softirqs+0x27d/0x850 kernel/softirq.c:626 __do_softirq kernel/softirq.c:660 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:727 irq_exit_rcu+0x9/0x30 kernel/softirq.c:743 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 RIP: 0010:getname_flags+0x0/0x540 fs/namei.c:137 Code: ff ff 4c 89 f7 e8 60 97 eb ff e9 3d ff ff ff cc cc cc cc cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 <0f> 1f 40 d6 55 41 57 41 56 41 55 41 54 53 48 83 ec 10 41 89 f4 49 RSP: 0018:ffffc90003167d98 EFLAGS: 00000246 RAX: ffffffff8239447a RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff88807cc13d00 RSI: 0000000000000000 RDI: 00007fff0ad9bf30 RBP: ffffc90003167e80 R08: 0000000000000003 R09: 0000000000000000 R10: ffffc90003167de0 R11: fffff5200062cfbe R12: 1ffff9200062cfb8 R13: ffffc90003167e90 R14: 00007fff0ad9bf30 R15: ffffc90003167de0 getname include/linux/fs.h:2497 [inline] do_sys_openat2+0xbc/0x200 fs/open.c:1387 do_sys_open fs/open.c:1397 [inline] __do_sys_openat fs/open.c:1413 [inline] __se_sys_openat fs/open.c:1408 [inline] __x64_sys_openat+0x138/0x170 fs/open.c:1408 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6f0e0a7407 Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff RSP: 002b:00007fff0ad9bdb0 EFLAGS: 00000202 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f6f0e76e880 RCX: 00007f6f0e0a7407 RDX: 0000000000080000 RSI: 00007fff0ad9bf30 RDI: ffffffffffffff9c RBP: 0000000000000008 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000560c657437f5 R13: 0000560c657437f5 R14: 0000000000000001 R15: 0000000000000000 Allocated by task 57: 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] __kmalloc_cache_noprof+0x3e2/0x700 mm/slub.c:5780 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] xpad_probe+0x428/0x1fc0 drivers/input/joystick/xpad.c:2075 usb_probe_interface+0x668/0xc90 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26d/0xad0 drivers/base/dd.c:659 __driver_probe_device+0x18c/0x320 drivers/base/dd.c:801 driver_probe_device+0x4f/0x240 drivers/base/dd.c:831 __device_attach_driver+0x279/0x430 drivers/base/dd.c:959 bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:500 __device_attach+0x2b8/0x430 drivers/base/dd.c:1031 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1086 bus_probe_device+0x12a/0x220 drivers/base/bus.c:574 device_add+0x7b6/0xb80 drivers/base/core.c:3689 usb_set_configuration+0x1a87/0x2110 drivers/usb/core/message.c:2210 usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250 usb_probe_device+0x1c4/0x3c0 drivers/usb/core/driver.c:291 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26d/0xad0 drivers/base/dd.c:659 __driver_probe_device+0x18c/0x320 drivers/base/dd.c:801 driver_probe_device+0x4f/0x240 drivers/base/dd.c:831 __device_attach_driver+0x279/0x430 drivers/base/dd.c:959 bus_for_each_drv+0x251/0x2e0 drivers/base/bus.c:500 __device_attach+0x2b8/0x430 drivers/base/dd.c:1031 device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1086 bus_probe_device+0x12a/0x220 drivers/base/bus.c:574 device_add+0x7b6/0xb80 drivers/base/core.c:3689 usb_new_device+0xa39/0x1720 drivers/usb/core/hub.c:2695 hub_port_connect drivers/usb/core/hub.c:5567 [inline] hub_port_connect_change drivers/usb/core/hub.c:5707 [inline] port_event drivers/usb/core/hub.c:5871 [inline] hub_event+0x29b1/0x4ef0 drivers/usb/core/hub.c:5953 process_one_work+0x93a/0x15a0 kernel/workqueue.c:3279 process_scheduled_works kernel/workqueue.c:3362 [inline] worker_thread+0x9b0/0xee0 kernel/workqueue.c:3443 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 Freed by task 5914: 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:2540 [inline] slab_free mm/slub.c:6674 [inline] kfree+0x1c0/0x660 mm/slub.c:6882 xpad_disconnect+0x350/0x480 drivers/input/joystick/xpad.c:2259 usb_unbind_interface+0x26e/0x910 drivers/usb/core/driver.c:458 device_remove drivers/base/dd.c:571 [inline] __device_release_driver drivers/base/dd.c:1282 [inline] device_release_driver_internal+0x4d9/0x800 drivers/base/dd.c:1305 bus_remove_device+0x34d/0x440 drivers/base/bus.c:616 device_del+0x511/0x8e0 drivers/base/core.c:3878 usb_disable_device+0x3d4/0x8e0 drivers/usb/core/message.c:1418 usb_disconnect+0x32f/0x990 drivers/usb/core/hub.c:2345 hub_port_connect drivers/usb/core/hub.c:5407 [inline] hub_port_connect_change drivers/usb/core/hub.c:5707 [inline] port_event drivers/usb/core/hub.c:5871 [inline] hub_event+0x1ca9/0x4ef0 drivers/usb/core/hub.c:5953 process_one_work+0x93a/0x15a0 kernel/workqueue.c:3279 process_scheduled_works kernel/workqueue.c:3362 [inline] worker_thread+0x9b0/0xee0 kernel/workqueue.c:3443 kthread+0x711/0x8a0 kernel/kthread.c:463 ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246 The buggy address belongs to the object at ffff888078356800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 92 bytes inside of freed 1024-byte region [ffff888078356800, ffff888078356c00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x78350 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88813fe26dc0 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88813fe26dc0 0000000000000000 dead000000000001 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea0001e0d401 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5825, tgid 5825 (syz-executor), ts 95360024207, free_ts 93060054027 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x234/0x290 mm/page_alloc.c:1857 prep_new_page mm/page_alloc.c:1865 [inline] get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5210 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab+0x86/0x3b0 mm/slub.c:3248 new_slab mm/slub.c:3302 [inline] ___slab_alloc+0xf2b/0x1960 mm/slub.c:4656 __slab_alloc+0x65/0x100 mm/slub.c:4779 __slab_alloc_node mm/slub.c:4855 [inline] slab_alloc_node mm/slub.c:5255 [inline] __kmalloc_cache_noprof+0x41e/0x700 mm/slub.c:5775 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] afs_alloc_call+0x79/0x550 fs/afs/rxrpc.c:163 afs_charge_preallocation+0x6f/0x4e0 fs/afs/rxrpc.c:747 afs_open_socket+0x302/0x3a0 fs/afs/rxrpc.c:112 afs_net_init+0x67d/0x880 fs/afs/main.c:116 ops_init+0x35c/0x5c0 net/core/net_namespace.c:137 setup_net+0x110/0x330 net/core/net_namespace.c:446 copy_net_ns+0x3e3/0x570 net/core/net_namespace.c:581 create_new_namespaces+0x3e7/0x6a0 kernel/nsproxy.c:130 page last free pid 5813 tgid 5813 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0xbc8/0xd30 mm/page_alloc.c:2943 __folio_put+0x21b/0x2c0 mm/swap.c:112 put_netmem net/core/skbuff.c:7417 [inline] skb_page_unref include/linux/skbuff_ref.h:43 [inline] __skb_frag_unref include/linux/skbuff_ref.h:56 [inline] skb_release_data+0x49a/0x7c0 net/core/skbuff.c:1101 skb_release_all net/core/skbuff.c:1182 [inline] __kfree_skb+0x55/0x70 net/core/skbuff.c:1196 tcp_clean_rtx_queue net/ipv4/tcp_input.c:3494 [inline] tcp_ack+0x2341/0x6a30 net/ipv4/tcp_input.c:4119 tcp_rcv_established+0x13de/0x2580 net/ipv4/tcp_input.c:6374 tcp_v4_do_rcv+0xa90/0x1430 net/ipv4/tcp_ipv4.c:1881 sk_backlog_rcv include/net/sock.h:1177 [inline] __release_sock+0x265/0x3a0 net/core/sock.c:3213 __sk_flush_backlog+0x36/0xc0 net/core/sock.c:3236 sk_flush_backlog include/net/sock.h:1240 [inline] tcp_sendmsg_locked+0x412f/0x5520 net/ipv4/tcp.c:1213 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1412 sock_sendmsg_nosec+0x128/0x1d0 net/socket.c:737 __sock_sendmsg net/socket.c:752 [inline] sock_write_iter+0x2d9/0x3d0 net/socket.c:1210 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x5c9/0xb30 fs/read_write.c:686 ksys_write+0x145/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 Memory state around the buggy address: ffff888078356700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888078356780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888078356800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888078356880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888078356900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess), 1 bytes skipped: 0: ff 4c 89 f7 decl -0x9(%rcx,%rcx,4) 4: e8 60 97 eb ff call 0xffeb9769 9: e9 3d ff ff ff jmp 0xffffff4b e: cc int3 f: cc int3 10: cc int3 11: cc int3 12: cc int3 13: cc int3 14: cc int3 15: cc int3 16: cc int3 17: cc int3 18: cc int3 19: 90 nop 1a: 90 nop 1b: 90 nop 1c: 90 nop 1d: 90 nop 1e: 90 nop 1f: 90 nop 20: 90 nop 21: 90 nop 22: 90 nop 23: 90 nop 24: 90 nop 25: 90 nop 26: 90 nop 27: 90 nop 28: 90 nop * 29: 0f 1f 40 d6 nopl -0x2a(%rax) <-- trapping instruction 2d: 55 push %rbp 2e: 41 57 push %r15 30: 41 56 push %r14 32: 41 55 push %r13 34: 41 54 push %r12 36: 53 push %rbx 37: 48 83 ec 10 sub $0x10,%rsp 3b: 41 89 f4 mov %esi,%r12d 3e: 49 rex.WB