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: use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline] BUG: KASAN: use-after-free in do_raw_spin_lock+0x283/0x2f0 kernel/locking/spinlock_debug.c:114 Read of size 4 at addr ffff88801dc1785c by task syz-executor/4188 CPU: 0 PID: 4188 Comm: syz-executor Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline] do_raw_spin_lock+0x283/0x2f0 kernel/locking/spinlock_debug.c:114 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:117 [inline] _raw_spin_lock_irqsave+0xbc/0x100 kernel/locking/spinlock.c:162 __wake_up_common_lock kernel/sched/wait.c:137 [inline] __wake_up+0xf4/0x180 kernel/sched/wait.c:157 __usb_hcd_giveback_urb+0x394/0x520 drivers/usb/core/hcd.c:1675 dummy_timer+0xa41/0x33c0 drivers/usb/gadget/udc/dummy_hcd.c:1998 call_timer_fn+0x17b/0x540 kernel/time/timer.c:1648 expire_timers kernel/time/timer.c:1699 [inline] __run_timers+0x56c/0x810 kernel/time/timer.c:1970 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1983 handle_softirqs+0x336/0x830 kernel/softirq.c:576 __do_softirq kernel/softirq.c:610 [inline] invoke_softirq kernel/softirq.c:450 [inline] __irq_exit_rcu+0x13b/0x230 kernel/softirq.c:659 irq_exit_rcu+0x5/0x20 kernel/softirq.c:671 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xbc/0x120 kernel/locking/spinlock.c:194 Code: c7 44 24 20 00 00 00 00 9c 8f 44 24 20 f7 44 24 20 00 02 00 00 41 c6 04 07 f8 75 4b f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 ef bf 89 f7 65 8b 05 00 e7 39 76 85 c0 74 3c 48 c7 04 24 0e 36 RSP: 0018:ffffc90002d876e0 EFLAGS: 00000206 RAX: dffffc0000000004 RBX: 0000000000000a06 RCX: db98e6b12fffa300 RDX: dffffc0000000000 RSI: ffffffff8a2b2be0 RDI: 0000000000000001 RBP: ffffc90002d87770 R08: ffff88802bd58053 R09: 1ffff110057ab00a R10: dffffc0000000000 R11: ffffed10057ab00b R12: dffffc0000000000 R13: ffff88802bd58050 R14: ffff88802bd58050 R15: 1ffff920005b0edc spin_unlock_irqrestore include/linux/spinlock.h:419 [inline] unlock_page_lruvec_irqrestore include/linux/memcontrol.h:1538 [inline] release_pages+0x1837/0x1bd0 mm/swap.c:960 __pagevec_release+0x6d/0xe0 mm/swap.c:983 pagevec_release include/linux/pagevec.h:81 [inline] shmem_undo_range+0x5cd/0x19a0 mm/shmem.c:964 shmem_truncate_range mm/shmem.c:1063 [inline] shmem_evict_inode+0x1e2/0x9a0 mm/shmem.c:1145 evict+0x4b6/0x8b0 fs/inode.c:647 __dentry_kill+0x412/0x630 fs/dcache.c:586 dentry_kill+0xb8/0x290 fs/dcache.c:-1 dput+0xd8/0x1a0 fs/dcache.c:893 __fput+0x5a5/0x8c0 fs/file_table.c:319 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7ff412151097 Code: a2 c7 05 5c 26 25 00 00 00 00 00 eb 96 e8 e1 12 00 00 90 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007fffd3d94398 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007ff4121e52ca RCX: 00007ff412151097 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007fffd3d94450 RBP: 00007fffd3d94450 R08: 00007fffd3d95450 R09: 00000000ffffffff R10: 0000000000000000 R11: 0000000000000246 R12: 00007fffd3d954e0 R13: 00007ff4121e52ca R14: 00000000000172fd R15: 00007fffd3d95520 Allocated by task 4341: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xaf/0xe0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:607 [inline] kzalloc include/linux/slab.h:738 [inline] xpad_probe+0x408/0x1980 drivers/input/joystick/xpad.c:1792 usb_probe_interface+0x5be/0xae0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x276/0xc70 drivers/base/dd.c:595 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775 driver_probe_device+0x4f/0x420 drivers/base/dd.c:805 __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:927 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 __device_attach+0x2a7/0x480 drivers/base/dd.c:999 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489 device_add+0xbcf/0x1050 drivers/base/core.c:3427 usb_set_configuration+0x19d5/0x2030 drivers/usb/core/message.c:2223 usb_generic_driver_probe+0x89/0x150 drivers/usb/core/generic.c:238 usb_probe_device+0x126/0x250 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x276/0xc70 drivers/base/dd.c:595 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775 driver_probe_device+0x4f/0x420 drivers/base/dd.c:805 __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:927 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429 __device_attach+0x2a7/0x480 drivers/base/dd.c:999 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489 device_add+0xbcf/0x1050 drivers/base/core.c:3427 usb_new_device+0x9f6/0x15d0 drivers/usb/core/hub.c:2632 hub_port_connect drivers/usb/core/hub.c:5497 [inline] hub_port_connect_change drivers/usb/core/hub.c:5637 [inline] port_event drivers/usb/core/hub.c:5799 [inline] hub_event+0x2b8d/0x5260 drivers/usb/core/hub.c:5881 process_one_work+0x867/0xff0 kernel/workqueue.c:2310 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Freed by task 4406: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1710 [inline] slab_free_freelist_hook+0xec/0x170 mm/slub.c:1736 slab_free mm/slub.c:3504 [inline] kfree+0xef/0x2a0 mm/slub.c:4564 xpad_disconnect+0x31f/0x440 drivers/input/joystick/xpad.c:1940 usb_unbind_interface+0x203/0x870 drivers/usb/core/driver.c:458 __device_release_driver drivers/base/dd.c:1249 [inline] device_release_driver_internal+0x487/0x710 drivers/base/dd.c:1282 bus_remove_device+0x2dd/0x400 drivers/base/bus.c:531 device_del+0x63f/0xa80 drivers/base/core.c:3615 usb_disable_device+0x3e7/0x8a0 drivers/usb/core/message.c:1472 usb_disconnect+0x33c/0x8a0 drivers/usb/core/hub.c:2287 hub_port_connect drivers/usb/core/hub.c:5341 [inline] hub_port_connect_change drivers/usb/core/hub.c:5637 [inline] port_event drivers/usb/core/hub.c:5799 [inline] hub_event+0x1d64/0x5260 drivers/usb/core/hub.c:5881 process_one_work+0x867/0xff0 kernel/workqueue.c:2310 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Last potentially related work creation: kasan_save_stack+0x35/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348 insert_work+0x54/0x3d0 kernel/workqueue.c:1366 __queue_work+0x90b/0xc80 kernel/workqueue.c:1532 queue_work_on+0x124/0x1f0 kernel/workqueue.c:1559 queue_work include/linux/workqueue.h:512 [inline] schedule_work include/linux/workqueue.h:573 [inline] xpad360w_process_packet drivers/input/joystick/xpad.c:857 [inline] xpad_irq_in+0xaec/0x1af0 drivers/input/joystick/xpad.c:997 __usb_hcd_giveback_urb+0x35d/0x520 drivers/usb/core/hcd.c:1672 dummy_timer+0xa41/0x33c0 drivers/usb/gadget/udc/dummy_hcd.c:1998 call_timer_fn+0x17b/0x540 kernel/time/timer.c:1648 expire_timers kernel/time/timer.c:1699 [inline] __run_timers+0x56c/0x810 kernel/time/timer.c:1970 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1983 handle_softirqs+0x336/0x830 kernel/softirq.c:576 __do_softirq kernel/softirq.c:610 [inline] invoke_softirq kernel/softirq.c:450 [inline] __irq_exit_rcu+0x13b/0x230 kernel/softirq.c:659 irq_exit_rcu+0x5/0x20 kernel/softirq.c:671 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676 Second to last potentially related work creation: kasan_save_stack+0x35/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348 insert_work+0x54/0x3d0 kernel/workqueue.c:1366 __queue_work+0x90b/0xc80 kernel/workqueue.c:1532 queue_work_on+0x124/0x1f0 kernel/workqueue.c:1559 queue_work include/linux/workqueue.h:512 [inline] schedule_work include/linux/workqueue.h:573 [inline] xpad360w_process_packet drivers/input/joystick/xpad.c:857 [inline] xpad_irq_in+0xaec/0x1af0 drivers/input/joystick/xpad.c:997 __usb_hcd_giveback_urb+0x35d/0x520 drivers/usb/core/hcd.c:1672 dummy_timer+0xa41/0x33c0 drivers/usb/gadget/udc/dummy_hcd.c:1998 call_timer_fn+0x17b/0x540 kernel/time/timer.c:1648 expire_timers kernel/time/timer.c:1699 [inline] __run_timers+0x56c/0x810 kernel/time/timer.c:1970 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1983 handle_softirqs+0x336/0x830 kernel/softirq.c:576 __do_softirq kernel/softirq.c:610 [inline] invoke_softirq kernel/softirq.c:450 [inline] __irq_exit_rcu+0x13b/0x230 kernel/softirq.c:659 irq_exit_rcu+0x5/0x20 kernel/softirq.c:671 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline] sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676 The buggy address belongs to the object at ffff88801dc17800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 92 bytes inside of 1024-byte region [ffff88801dc17800, ffff88801dc17c00) The buggy address belongs to the page: page:ffffea0000770400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1dc10 head:ffffea0000770400 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888016c41dc0 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 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 4039, ts 57150670355, free_ts 57009915030 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501 alloc_slab_page mm/slub.c:1780 [inline] allocate_slab mm/slub.c:1917 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1980 ___slab_alloc+0x807/0xdd0 mm/slub.c:3013 __slab_alloc mm/slub.c:3100 [inline] slab_alloc_node mm/slub.c:3191 [inline] __kmalloc_node_track_caller+0x13d/0x3a0 mm/slub.c:4963 kmalloc_reserve net/core/skbuff.c:356 [inline] __alloc_skb+0x22c/0x750 net/core/skbuff.c:427 alloc_skb_fclone include/linux/skbuff.h:1212 [inline] sk_stream_alloc_skb+0x204/0xb50 net/ipv4/tcp.c:892 tcp_sendmsg_locked+0xcbb/0x3330 net/ipv4/tcp.c:1317 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1460 sock_sendmsg_nosec net/socket.c:706 [inline] __sock_sendmsg net/socket.c:718 [inline] sock_write_iter+0x2a6/0x3a0 net/socket.c:1090 call_write_iter include/linux/fs.h:2173 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x748/0xd70 fs/read_write.c:594 ksys_write+0x153/0x260 fs/read_write.c:647 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3396 put_page include/linux/mm.h:1258 [inline] __skb_frag_unref include/linux/skbuff.h:3254 [inline] skb_release_data+0x35c/0x830 net/core/skbuff.c:672 skb_release_all net/core/skbuff.c:742 [inline] __kfree_skb+0x4c/0x60 net/core/skbuff.c:756 sk_eat_skb include/net/sock.h:2793 [inline] tcp_recvmsg_locked+0x143d/0x2690 net/ipv4/tcp.c:2520 tcp_recvmsg+0x22a/0x760 net/ipv4/tcp.c:2566 inet_recvmsg+0x146/0x200 net/ipv4/af_inet.c:868 sock_recvmsg_nosec net/socket.c:969 [inline] sock_recvmsg net/socket.c:987 [inline] sock_read_iter+0x2c2/0x380 net/socket.c:1068 call_read_iter include/linux/fs.h:2167 [inline] new_sync_read fs/read_write.c:404 [inline] vfs_read+0x75e/0xd50 fs/read_write.c:485 ksys_read+0x153/0x260 fs/read_write.c:623 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Memory state around the buggy address: ffff88801dc17700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801dc17780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801dc17800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801dc17880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801dc17900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: c7 44 24 20 00 00 00 movl $0x0,0x20(%rsp) 7: 00 8: 9c pushf 9: 8f 44 24 20 pop 0x20(%rsp) d: f7 44 24 20 00 02 00 testl $0x200,0x20(%rsp) 14: 00 15: 41 c6 04 07 f8 movb $0xf8,(%r15,%rax,1) 1a: 75 4b jne 0x67 1c: f7 c3 00 02 00 00 test $0x200,%ebx 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 ef bf 89 f7 call 0xf789c01e <-- trapping instruction 2f: 65 8b 05 00 e7 39 76 mov %gs:0x7639e700(%rip),%eax # 0x7639e736 36: 85 c0 test %eax,%eax 38: 74 3c je 0x76 3a: 48 rex.W 3b: c7 .byte 0xc7 3c: 04 24 add $0x24,%al 3e: 0e (bad) 3f: 36 ss