xpad 4-1:179.65: xpad_irq_in - usb_submit_urb failed with result -19
xpad 4-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+0x28a/0x2f0 kernel/locking/spinlock_debug.c:115
Read of size 4 at addr ffff88807f52305c by task syz-executor/10352
CPU: 1 UID: 0 PID: 10352 Comm: syz-executor Tainted: G L syzkaller #0 PREEMPT(full)
Tainted: [L]=SOFTLOCKUP
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
debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline]
do_raw_spin_lock+0x28a/0x2f0 kernel/locking/spinlock_debug.c:115
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:156 [inline]
_raw_spin_lock_irqsave+0x4c/0x60 kernel/locking/spinlock.c:181
__wake_up_common_lock+0x30/0x1f0 kernel/sched/wait.c:124
__usb_hcd_giveback_urb+0x3b6/0x540 drivers/usb/core/hcd.c:1660
dummy_timer+0xa91/0x4cf0 drivers/usb/gadget/udc/dummy_hcd.c:2019
__run_hrtimer kernel/time/hrtimer.c:2067 [inline]
__hrtimer_run_queues+0x3bc/0xa10 kernel/time/hrtimer.c:2124
hrtimer_run_softirq+0x1e3/0x2e0 kernel/time/hrtimer.c:2141
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:767
irq_exit_rcu+0x9/0x30 kernel/softirq.c:784
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
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:211 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x47/0x80 kernel/locking/spinlock.c:221
Code: f7 e8 ad c6 c4 f5 f7 c3 00 02 00 00 74 05 e8 80 e7 f0 f5 9c 58 a9 00 02 00 00 75 29 f7 c3 00 02 00 00 74 01 fb bf 01 00 00 00 b4 e6 b5 f5 65 48 8b 05 2c 2e 92 07 48 85 c0 74 18 5b 41 5e c3
RSP: 0018:ffffc900039efb68 EFLAGS: 00000206
RAX: 0000000000000002 RBX: 0000000000000202 RCX: 8000000000000001
RDX: 0000000000000000 RSI: ffffffff8e25cc49 RDI: 0000000000000001
RBP: ffffc900039efc10 R08: ffffffff9058d537 R09: 1ffffffff20b1aa6
R10: dffffc0000000000 R11: fffffbfff20b1aa7 R12: 0000000000000202
R13: 1ffff9200073df70 R14: ffffffff8f488e18 R15: dffffc0000000000
spin_unlock_irqrestore include/linux/spinlock.h:425 [inline]
add_device_randomness+0xcf/0x130 drivers/char/random.c:936
add_latent_entropy include/linux/random.h:26 [inline]
kernel_clone+0x2e3/0x940 kernel/fork.c:2773
__do_sys_clone kernel/fork.c:2914 [inline]
__se_sys_clone kernel/fork.c:2898 [inline]
__x64_sys_clone+0x1b6/0x230 kernel/fork.c:2898
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:0x7fc7c7fc6b52
Code: 89 e7 e8 71 8b f7 ff 45 31 c0 31 d2 31 f6 64 48 8b 04 25 10 00 00 00 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 66 89 c5 85 c0 75 3b 64 48 8b 04 25 10 00 00
RSP: 002b:00007fc7c834fc60 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007fc7c834fc60 RCX: 00007fc7c7fc6b52
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 00007fc7c834fdec R08: 0000000000000000 R09: 0000000000000001
R10: 00005555873f77d0 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000000927c0 R14: 00000000000669d8 R15: 00007fc7c834fe40
Allocated by task 29:
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+0x331/0x660 mm/slub.c:5484
_kmalloc_noprof include/linux/slab.h:988 [inline]
_kzalloc_noprof include/linux/slab.h:1309 [inline]
xpad_probe+0x43f/0x2020 drivers/input/joystick/xpad.c:2060
usb_probe_interface+0x653/0xc60 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:706
__driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
__device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
__device_attach+0x2c4/0x450 drivers/base/dd.c:1098
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
device_add+0x7d7/0xb80 drivers/base/core.c:3776
usb_set_configuration+0x1ad8/0x2180 drivers/usb/core/message.c:2268
usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:250
usb_probe_device+0x1c3/0x3b0 drivers/usb/core/driver.c:291
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:706
__driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
driver_probe_device+0x4f/0x240 drivers/base/dd.c:898
__device_attach_driver+0x270/0x410 drivers/base/dd.c:1026
bus_for_each_drv+0x258/0x2f0 drivers/base/bus.c:500
__device_attach+0x2c4/0x450 drivers/base/dd.c:1098
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1153
bus_probe_device+0x12a/0x220 drivers/base/bus.c:620
device_add+0x7d7/0xb80 drivers/base/core.c:3776
usb_new_device+0x9aa/0x1690 drivers/usb/core/hub.c:2703
hub_port_connect drivers/usb/core/hub.c:5575 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5715 [inline]
port_event drivers/usb/core/hub.c:5879 [inline]
hub_event+0x28e8/0x4d30 drivers/usb/core/hub.c:5961
process_one_work kernel/workqueue.c:3387 [inline]
process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
kthread+0x38b/0x480 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Freed by task 188:
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:2678 [inline]
slab_free mm/slub.c:6372 [inline]
kfree+0x1c5/0x640 mm/slub.c:6687
xpad_disconnect+0x323/0x440 drivers/input/joystick/xpad.c:2244
usb_unbind_interface+0x295/0x9f0 drivers/usb/core/driver.c:458
device_remove drivers/base/dd.c:618 [inline]
__device_release_driver drivers/base/dd.c:1349 [inline]
device_release_driver_internal+0x4f5/0x880 drivers/base/dd.c:1372
bus_remove_device+0x444/0x560 drivers/base/bus.c:664
device_del+0x524/0x8f0 drivers/base/core.c:3965
usb_disable_device+0x3d4/0x8d0 drivers/usb/core/message.c:1478
usb_disconnect+0x346/0x9a0 drivers/usb/core/hub.c:2345
hub_port_connect drivers/usb/core/hub.c:5415 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5715 [inline]
port_event drivers/usb/core/hub.c:5879 [inline]
hub_event+0x1bbb/0x4d30 drivers/usb/core/hub.c:5961
process_one_work kernel/workqueue.c:3387 [inline]
process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3470
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3551
kthread+0x38b/0x480 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
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
insert_work+0x3d/0x330 kernel/workqueue.c:2272
__queue_work+0xd07/0x10d0 kernel/workqueue.c:2448
queue_work_on+0x106/0x1d0 kernel/workqueue.c:2501
queue_work include/linux/workqueue.h:699 [inline]
schedule_work include/linux/workqueue.h:760 [inline]
xpad360w_process_packet drivers/input/joystick/xpad.c:1011 [inline]
xpad_irq_in+0xabf/0x23f0 drivers/input/joystick/xpad.c:1237
__usb_hcd_giveback_urb+0x378/0x540 drivers/usb/core/hcd.c:1657
dummy_timer+0xa91/0x4cf0 drivers/usb/gadget/udc/dummy_hcd.c:2019
__run_hrtimer kernel/time/hrtimer.c:2067 [inline]
__hrtimer_run_queues+0x3bc/0xa10 kernel/time/hrtimer.c:2124
hrtimer_run_softirq+0x1e3/0x2e0 kernel/time/hrtimer.c:2141
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:767
irq_exit_rcu+0x9/0x30 kernel/softirq.c:784
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
Second to 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
insert_work+0x3d/0x330 kernel/workqueue.c:2272
__queue_work+0xd07/0x10d0 kernel/workqueue.c:2448
queue_work_on+0x106/0x1d0 kernel/workqueue.c:2501
queue_work include/linux/workqueue.h:699 [inline]
schedule_work include/linux/workqueue.h:760 [inline]
xpad360w_process_packet drivers/input/joystick/xpad.c:1011 [inline]
xpad_irq_in+0xabf/0x23f0 drivers/input/joystick/xpad.c:1237
__usb_hcd_giveback_urb+0x378/0x540 drivers/usb/core/hcd.c:1657
dummy_timer+0xa91/0x4cf0 drivers/usb/gadget/udc/dummy_hcd.c:2019
__run_hrtimer kernel/time/hrtimer.c:2067 [inline]
__hrtimer_run_queues+0x3bc/0xa10 kernel/time/hrtimer.c:2124
hrtimer_run_softirq+0x1e3/0x2e0 kernel/time/hrtimer.c:2141
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:767
irq_exit_rcu+0x9/0x30 kernel/softirq.c:784
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
The buggy address belongs to the object at ffff88807f523000
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 92 bytes inside of
freed 1024-byte region [ffff88807f523000, ffff88807f523400)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88807f522800 pfn:0x7f520
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 ffff88801b003dc0 ffffea0001ee7e10 ffffea0000cb6210
raw: ffff88807f522800 000000080010000e 00000000f5000000 0000000000000000
head: 00fff00000000240 ffff88801b003dc0 ffffea0001ee7e10 ffffea0000cb6210
head: ffff88807f522800 000000080010000e 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 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5294, tgid 5294 (dhcpcd-run-hook), ts 56637770490
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:3267 [inline]
allocate_slab+0x7c/0x5e0 mm/slub.c:3382
new_slab mm/slub.c:3428 [inline]
refill_objects+0x2d5/0x350 mm/slub.c:7305
refill_sheaf mm/slub.c:2805 [inline]
__pcs_replace_empty_main+0x2c3/0x6b0 mm/slub.c:4677
alloc_from_pcs mm/slub.c:4775 [inline]
slab_alloc_node mm/slub.c:4907 [inline]
__do_kmalloc_node mm/slub.c:5336 [inline]
__kmalloc_noprof+0x489/0x720 mm/slub.c:5362
_kmalloc_noprof include/linux/slab.h:992 [inline]
_kzalloc_noprof include/linux/slab.h:1309 [inline]
tomoyo_init_log+0x1aae/0x1fa0 security/tomoyo/audit.c:273
tomoyo_supervisor+0x35f/0x1560 security/tomoyo/common.c:2232
tomoyo_audit_env_log security/tomoyo/environ.c:37 [inline]
tomoyo_env_perm+0x151/0x1f0 security/tomoyo/environ.c:64
tomoyo_environ security/tomoyo/domain.c:673 [inline]
tomoyo_find_next_domain+0x1332/0x1a90 security/tomoyo/domain.c:889
tomoyo_bprm_check_security+0x11b/0x180 security/tomoyo/tomoyo.c:102
security_bprm_check+0x85/0x240 security/security.c:820
search_binary_handler fs/exec.c:1746 [inline]
exec_binprm fs/exec.c:1788 [inline]
bprm_execve+0x888/0x1590 fs/exec.c:1844
do_execveat_common+0x4f4/0x670 fs/exec.c:1942
__do_sys_execve fs/exec.c:2015 [inline]
__se_sys_execve fs/exec.c:2009 [inline]
__x64_sys_execve+0x97/0xc0 fs/exec.c:2009
page last free pid 5294 tgid 5294 ts 56634659978 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:5736
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:4586 [inline]
slab_alloc_node mm/slub.c:4919 [inline]
kmem_cache_alloc_noprof+0x2a4/0x5f0 mm/slub.c:4933
new_handle fs/jbd2/transaction.c:457 [inline]
jbd2__journal_start+0x145/0x5d0 fs/jbd2/transaction.c:485
__ext4_journal_start_sb+0x205/0x780 fs/ext4/ext4_jbd2.c:122
__ext4_journal_start fs/ext4/ext4_jbd2.h:238 [inline]
ext4_dirty_inode+0x93/0x110 fs/ext4/inode.c:6728
__mark_inode_dirty+0x3a8/0x13b0 fs/fs-writeback.c:2729
generic_update_time fs/inode.c:2253 [inline]
touch_atime+0x568/0x670 fs/inode.c:2328
file_accessed include/linux/fs.h:2278 [inline]
filemap_read+0xffc/0x11e0 mm/filemap.c:2896
ext4_file_read_iter+0x553/0xad0 fs/ext4/file.c:-1
__kernel_read+0x4ca/0x960 fs/read_write.c:532
prepare_binprm fs/exec.c:1695 [inline]
search_binary_handler fs/exec.c:1742 [inline]
exec_binprm fs/exec.c:1788 [inline]
bprm_execve+0x862/0x1590 fs/exec.c:1844
do_execveat_common+0x4f4/0x670 fs/exec.c:1942
Memory state around the buggy address:
ffff88807f522f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807f522f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88807f523000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807f523080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807f523100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: f7 e8 imul %eax
2: ad lods %ds:(%rsi),%eax
3: c6 c4 f5 mov $0xf5,%ah
6: f7 c3 00 02 00 00 test $0x200,%ebx
c: 74 05 je 0x13
e: e8 80 e7 f0 f5 call 0xf5f0e793
13: 9c pushf
14: 58 pop %rax
15: a9 00 02 00 00 test $0x200,%eax
1a: 75 29 jne 0x45
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 b4 e6 b5 f5 call 0xf5b5e6e3 <-- trapping instruction
2f: 65 48 8b 05 2c 2e 92 mov %gs:0x7922e2c(%rip),%rax # 0x7922e63
36: 07
37: 48 85 c0 test %rax,%rax
3a: 74 18 je 0x54
3c: 5b pop %rbx
3d: 41 5e pop %r14
3f: c3 ret