xpad 1-1:179.65: xpad_irq_in - usb_submit_urb failed with result -19
xpad 1-1:179.65: xpad_irq_out - usb_submit_urb failed with result -19
==================================================================
BUG: KASAN: slab-use-after-free in register_lock_class+0x8d1/0x980 kernel/locking/lockdep.c:1333
Read of size 1 at addr ffff88802e181891 by task syz-executor.1/5092
CPU: 1 PID: 5092 Comm: syz-executor.1 Not tainted 6.8.0-rc4-syzkaller-00180-g4f5e5092fdbf #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e7/0x2e0 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:377 [inline]
print_report+0x167/0x540 mm/kasan/report.c:488
kasan_report+0x142/0x180 mm/kasan/report.c:601
register_lock_class+0x8d1/0x980 kernel/locking/lockdep.c:1333
__lock_acquire+0xd9/0x1fd0 kernel/locking/lockdep.c:5014
lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
__wake_up_common_lock+0x25/0x1e0 kernel/sched/wait.c:105
__usb_hcd_giveback_urb+0x3ac/0x530 drivers/usb/core/hcd.c:1653
dummy_timer+0x8aa/0x3220 drivers/usb/gadget/udc/dummy_hcd.c:1987
call_timer_fn+0x17e/0x600 kernel/time/timer.c:1700
expire_timers kernel/time/timer.c:1751 [inline]
__run_timers+0x621/0x830 kernel/time/timer.c:2038
run_timer_softirq+0x67/0xf0 kernel/time/timer.c:2051
__do_softirq+0x2bb/0x942 kernel/softirq.c:553
invoke_softirq kernel/softirq.c:427 [inline]
__irq_exit_rcu+0xf1/0x1c0 kernel/softirq.c:632
irq_exit_rcu+0x9/0x30 kernel/softirq.c:644
sysvec_apic_timer_interrupt+0x97/0xb0 arch/x86/kernel/apic/apic.c:1076
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:copy_pmd_range mm/memory.c:1187 [inline]
RIP: 0010:copy_pud_range mm/memory.c:1224 [inline]
RIP: 0010:copy_p4d_range mm/memory.c:1248 [inline]
RIP: 0010:copy_page_range+0x195b/0x4240 mm/memory.c:1346
Code: 5c 24 3c 48 8b 4c 24 30 48 81 c1 00 10 00 00 48 89 4c 24 30 48 3b 8c 24 10 01 00 00 0f 84 cb 1c 00 00 01 c3 48 83 44 24 60 08 <48> 83 44 24 20 08 e8 9a 3f b9 ff e9 21 f7 ff ff 48 8b 84 24 f8 00
RSP: 0018:ffffc900045d7400 EFLAGS: 00000286
RAX: 0000000000000008 RBX: 0000000000000008 RCX: 00007f028c05d000
RDX: 0000000000000000 RSI: ffffffff8baac760 RDI: ffffc900045d7700
RBP: ffffc900045d78b0 R08: ffffffff8f842f2f R09: 1ffffffff1f085e5
R10: dffffc0000000000 R11: fffffbfff1f085e6 R12: ffff8880252c0aa0
R13: dffffc0000000000 R14: 800000004f971007 R15: 800000004f971007
dup_mmap kernel/fork.c:745 [inline]
dup_mm kernel/fork.c:1685 [inline]
copy_mm+0x12f4/0x21b0 kernel/fork.c:1734
copy_process+0x1d73/0x3fc0 kernel/fork.c:2497
kernel_clone+0x222/0x840 kernel/fork.c:2902
__do_sys_clone kernel/fork.c:3045 [inline]
__se_sys_clone kernel/fork.c:3029 [inline]
__x64_sys_clone+0x258/0x2a0 kernel/fork.c:3029
do_syscall_64+0xf9/0x240
entry_SYSCALL_64_after_hwframe+0x6f/0x77
RIP: 0033:0x7f028c67add3
Code: 1f 84 00 00 00 00 00 64 48 8b 04 25 10 00 00 00 45 31 c0 31 d2 31 f6 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 35 89 c2 85 c0 75 2c 64 48 8b 04 25 10 00 00
RSP: 002b:00007ffd592f2b58 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f028c67add3
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
R10: 00005555557c8750 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000001
Allocated by task 13705:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:372 [inline]
__kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:389
kasan_kmalloc include/linux/kasan.h:211 [inline]
kmalloc_trace+0x1d6/0x360 mm/slub.c:4012
kmalloc include/linux/slab.h:590 [inline]
kzalloc include/linux/slab.h:711 [inline]
xpad_probe+0x3c8/0x1b90 drivers/input/joystick/xpad.c:2007
usb_probe_interface+0x5cb/0xb00 drivers/usb/core/driver.c:399
really_probe+0x29e/0xc50 drivers/base/dd.c:658
__driver_probe_device+0x1a2/0x3e0 drivers/base/dd.c:800
driver_probe_device+0x50/0x430 drivers/base/dd.c:830
__device_attach_driver+0x2d6/0x530 drivers/base/dd.c:958
bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:457
__device_attach+0x333/0x520 drivers/base/dd.c:1030
bus_probe_device+0x189/0x260 drivers/base/bus.c:532
device_add+0x8ff/0xca0 drivers/base/core.c:3625
usb_set_configuration+0x1976/0x1fb0 drivers/usb/core/message.c:2207
usb_generic_driver_probe+0x88/0x140 drivers/usb/core/generic.c:254
usb_probe_device+0x13e/0x2d0 drivers/usb/core/driver.c:294
really_probe+0x29e/0xc50 drivers/base/dd.c:658
__driver_probe_device+0x1a2/0x3e0 drivers/base/dd.c:800
driver_probe_device+0x50/0x430 drivers/base/dd.c:830
__device_attach_driver+0x2d6/0x530 drivers/base/dd.c:958
bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:457
__device_attach+0x333/0x520 drivers/base/dd.c:1030
bus_probe_device+0x189/0x260 drivers/base/bus.c:532
device_add+0x8ff/0xca0 drivers/base/core.c:3625
usb_new_device+0x104a/0x19a0 drivers/usb/core/hub.c:2614
hub_port_connect drivers/usb/core/hub.c:5483 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5623 [inline]
port_event drivers/usb/core/hub.c:5783 [inline]
hub_event+0x2d13/0x50f0 drivers/usb/core/hub.c:5865
process_one_work kernel/workqueue.c:2633 [inline]
process_scheduled_works+0x913/0x1420 kernel/workqueue.c:2706
worker_thread+0xa5f/0x1000 kernel/workqueue.c:2787
kthread+0x2ef/0x390 kernel/kthread.c:388
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242
Freed by task 8:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
kasan_save_free_info+0x4e/0x60 mm/kasan/generic.c:640
poison_slab_object+0xa6/0xe0 mm/kasan/common.c:241
__kasan_slab_free+0x34/0x70 mm/kasan/common.c:257
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2121 [inline]
slab_free mm/slub.c:4299 [inline]
kfree+0x14a/0x380 mm/slub.c:4409
xpad_disconnect+0x359/0x490 drivers/input/joystick/xpad.c:2188
usb_unbind_interface+0x1d4/0x850 drivers/usb/core/driver.c:461
device_remove drivers/base/dd.c:569 [inline]
__device_release_driver drivers/base/dd.c:1272 [inline]
device_release_driver_internal+0x503/0x7c0 drivers/base/dd.c:1295
bus_remove_device+0x34f/0x420 drivers/base/bus.c:574
device_del+0x580/0xa30 drivers/base/core.c:3814
usb_disable_device+0x3bf/0x850 drivers/usb/core/message.c:1416
usb_disconnect+0x340/0x950 drivers/usb/core/hub.c:2267
hub_port_connect drivers/usb/core/hub.c:5323 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5623 [inline]
port_event drivers/usb/core/hub.c:5783 [inline]
hub_event+0x1e62/0x50f0 drivers/usb/core/hub.c:5865
process_one_work kernel/workqueue.c:2633 [inline]
process_scheduled_works+0x913/0x1420 kernel/workqueue.c:2706
worker_thread+0xa5f/0x1000 kernel/workqueue.c:2787
kthread+0x2ef/0x390 kernel/kthread.c:388
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242
Last potentially related work creation:
kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47
__kasan_record_aux_stack+0xae/0x100 mm/kasan/generic.c:586
insert_work+0x3e/0x330 kernel/workqueue.c:1653
__queue_work+0xbf4/0x1000 kernel/workqueue.c:1802
queue_work_on+0x14f/0x250 kernel/workqueue.c:1837
queue_work include/linux/workqueue.h:548 [inline]
schedule_work include/linux/workqueue.h:609 [inline]
xpad360w_process_packet drivers/input/joystick/xpad.c:952 [inline]
xpad_irq_in+0xab0/0x2510 drivers/input/joystick/xpad.c:1163
__usb_hcd_giveback_urb+0x373/0x530 drivers/usb/core/hcd.c:1650
dummy_timer+0x8aa/0x3220 drivers/usb/gadget/udc/dummy_hcd.c:1987
call_timer_fn+0x17e/0x600 kernel/time/timer.c:1700
expire_timers kernel/time/timer.c:1751 [inline]
__run_timers+0x621/0x830 kernel/time/timer.c:2038
run_timer_softirq+0x67/0xf0 kernel/time/timer.c:2051
__do_softirq+0x2bb/0x942 kernel/softirq.c:553
Second to last potentially related work creation:
kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47
__kasan_record_aux_stack+0xae/0x100 mm/kasan/generic.c:586
insert_work+0x3e/0x330 kernel/workqueue.c:1653
__queue_work+0xbf4/0x1000 kernel/workqueue.c:1802
queue_work_on+0x14f/0x250 kernel/workqueue.c:1837
queue_work include/linux/workqueue.h:548 [inline]
schedule_work include/linux/workqueue.h:609 [inline]
xpad360w_process_packet drivers/input/joystick/xpad.c:952 [inline]
xpad_irq_in+0xab0/0x2510 drivers/input/joystick/xpad.c:1163
__usb_hcd_giveback_urb+0x373/0x530 drivers/usb/core/hcd.c:1650
dummy_timer+0x8aa/0x3220 drivers/usb/gadget/udc/dummy_hcd.c:1987
call_timer_fn+0x17e/0x600 kernel/time/timer.c:1700
expire_timers kernel/time/timer.c:1751 [inline]
__run_timers+0x621/0x830 kernel/time/timer.c:2038
run_timer_softirq+0x67/0xf0 kernel/time/timer.c:2051
__do_softirq+0x2bb/0x942 kernel/softirq.c:553
The buggy address belongs to the object at ffff88802e181800
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 145 bytes inside of
freed 1024-byte region [ffff88802e181800, ffff88802e181c00)
The buggy address belongs to the physical page:
page:ffffea0000b86000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2e180
head:ffffea0000b86000 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014c41dc0 ffffea0001e72a00 dead000000000002
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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5141, tgid 5141 (kworker/0:4), ts 237505836421, free_ts 237430622413
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1533
prep_new_page mm/page_alloc.c:1540 [inline]
get_page_from_freelist+0x33ea/0x3580 mm/page_alloc.c:3311
__alloc_pages+0x255/0x680 mm/page_alloc.c:4567
__alloc_pages_node include/linux/gfp.h:238 [inline]
alloc_pages_node include/linux/gfp.h:261 [inline]
alloc_slab_page+0x5f/0x160 mm/slub.c:2190
allocate_slab mm/slub.c:2354 [inline]
new_slab+0x84/0x2f0 mm/slub.c:2407
___slab_alloc+0xd17/0x13e0 mm/slub.c:3540
__slab_alloc mm/slub.c:3625 [inline]
__slab_alloc_node mm/slub.c:3678 [inline]
slab_alloc_node mm/slub.c:3850 [inline]
__do_kmalloc_node mm/slub.c:3980 [inline]
__kmalloc+0x2e0/0x490 mm/slub.c:3994
kmalloc include/linux/slab.h:594 [inline]
kzalloc include/linux/slab.h:711 [inline]
neigh_alloc net/core/neighbour.c:494 [inline]
___neigh_create+0x691/0x2450 net/core/neighbour.c:648
ip6_finish_output2+0x1610/0x1660 net/ipv6/ip6_output.c:128
ip6_finish_output+0x41e/0x810 net/ipv6/ip6_output.c:222
NF_HOOK include/linux/netfilter.h:314 [inline]
ndisc_send_skb+0xab0/0x1380 net/ipv6/ndisc.c:509
ndisc_send_ns+0xcc/0x160 net/ipv6/ndisc.c:667
addrconf_dad_work+0xb45/0x16f0 net/ipv6/addrconf.c:4217
process_one_work kernel/workqueue.c:2633 [inline]
process_scheduled_works+0x913/0x1420 kernel/workqueue.c:2706
worker_thread+0xa5f/0x1000 kernel/workqueue.c:2787
kthread+0x2ef/0x390 kernel/kthread.c:388
page last free pid 5102 tgid 5102 stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1140 [inline]
free_unref_page_prepare+0x95d/0xa80 mm/page_alloc.c:2346
free_unref_page+0x37/0x3f0 mm/page_alloc.c:2486
__slab_free+0x349/0x410 mm/slub.c:4211
qlink_free mm/kasan/quarantine.c:160 [inline]
qlist_free_all+0x6d/0xd0 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:324
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3813 [inline]
slab_alloc_node mm/slub.c:3860 [inline]
kmem_cache_alloc_node+0x18f/0x380 mm/slub.c:3903
__alloc_skb+0x181/0x420 net/core/skbuff.c:641
alloc_skb include/linux/skbuff.h:1296 [inline]
alloc_skb_with_frags+0xc3/0x780 net/core/skbuff.c:6394
sock_alloc_send_pskb+0x919/0xa60 net/core/sock.c:2784
sock_alloc_send_skb include/net/sock.h:1855 [inline]
mld_newpack+0x1c3/0xa90 net/ipv6/mcast.c:1746
add_grhead net/ipv6/mcast.c:1849 [inline]
add_grec+0x1492/0x19a0 net/ipv6/mcast.c:1987
mld_send_initial_cr+0xed/0x240 net/ipv6/mcast.c:2233
mld_dad_work+0x45/0x270 net/ipv6/mcast.c:2259
process_one_work kernel/workqueue.c:2633 [inline]
process_scheduled_works+0x913/0x1420 kernel/workqueue.c:2706
worker_thread+0xa5f/0x1000 kernel/workqueue.c:2787
Memory state around the buggy address:
ffff88802e181780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88802e181800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88802e181880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88802e181900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88802e181980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 5c pop %rsp
1: 24 3c and $0x3c,%al
3: 48 8b 4c 24 30 mov 0x30(%rsp),%rcx
8: 48 81 c1 00 10 00 00 add $0x1000,%rcx
f: 48 89 4c 24 30 mov %rcx,0x30(%rsp)
14: 48 3b 8c 24 10 01 00 cmp 0x110(%rsp),%rcx
1b: 00
1c: 0f 84 cb 1c 00 00 je 0x1ced
22: 01 c3 add %eax,%ebx
24: 48 83 44 24 60 08 addq $0x8,0x60(%rsp)
* 2a: 48 83 44 24 20 08 addq $0x8,0x20(%rsp) <-- trapping instruction
30: e8 9a 3f b9 ff call 0xffb93fcf
35: e9 21 f7 ff ff jmp 0xfffff75b
3a: 48 rex.W
3b: 8b .byte 0x8b
3c: 84 24 f8 test %ah,(%rax,%rdi,8)