==================================================================
BUG: KASAN: slab-out-of-bounds in memcpy include/linux/fortify-string.h:225 [inline]
BUG: KASAN: slab-out-of-bounds in usb_hcd_poll_rh_status+0x376/0x780 drivers/usb/core/hcd.c:774
Write of size 2 at addr ffff8880245d3cc0 by task syz-executor.2/1099
CPU: 1 PID: 1099 Comm: syz-executor.2 Not tainted 5.16.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
print_address_description.constprop.0.cold+0x8d/0x2ed mm/kasan/report.c:247
__kasan_report mm/kasan/report.c:433 [inline]
kasan_report.cold+0x83/0xdf mm/kasan/report.c:450
check_region_inline mm/kasan/generic.c:183 [inline]
kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189
memcpy+0x39/0x60 mm/kasan/shadow.c:66
memcpy include/linux/fortify-string.h:225 [inline]
usb_hcd_poll_rh_status+0x376/0x780 drivers/usb/core/hcd.c:774
call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421
expire_timers kernel/time/timer.c:1466 [inline]
__run_timers.part.0+0x675/0xa20 kernel/time/timer.c:1734
__run_timers kernel/time/timer.c:1715 [inline]
run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747
__do_softirq+0x29b/0x9c2 kernel/softirq.c:558
invoke_softirq kernel/softirq.c:432 [inline]
__irq_exit_rcu+0x123/0x180 kernel/softirq.c:637
irq_exit_rcu+0x5/0x20 kernel/softirq.c:649
sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:finish_task_switch.isra.0+0x323/0xb80 kernel/sched/core.c:4852
Code: 03 54 f4 07 85 c0 75 02 0f 0b 48 85 db 0f 85 25 01 00 00 4c 89 f7 e8 fc f7 ff ff e8 37 4c 2d 00 fb 65 48 8b 1c 25 40 70 02 00 <48> 8d bb 80 15 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1
RSP: 0018:ffffc900031cfae8 EFLAGS: 00000206
RAX: 000000000003d9ff RBX: ffff888027a7e240 RCX: 1ffffffff1b218c9
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc900031cfb30 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff817d2988 R11: 0000000000000001 R12: ffff8880b9d3a858
R13: ffff888034882200 R14: ffff8880b9d39b00 R15: ffff8880b9d3a538
context_switch kernel/sched/core.c:4975 [inline]
__schedule+0xaa2/0x4940 kernel/sched/core.c:6253
schedule+0xd2/0x260 kernel/sched/core.c:6326
freezable_schedule include/linux/freezer.h:172 [inline]
do_nanosleep+0x24e/0x690 kernel/time/hrtimer.c:2044
hrtimer_nanosleep+0x1f9/0x4a0 kernel/time/hrtimer.c:2097
common_nsleep+0xa2/0xc0 kernel/time/posix-timers.c:1227
__do_sys_clock_nanosleep kernel/time/posix-timers.c:1267 [inline]
__se_sys_clock_nanosleep kernel/time/posix-timers.c:1245 [inline]
__x64_sys_clock_nanosleep+0x2f4/0x430 kernel/time/posix-timers.c:1245
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f1f0d6ac821
Code: 24 0c 89 3c 24 48 89 4c 24 18 e8 aa e7 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 8b 74 24 0c 8b 3c 24 b8 e6 00 00 00 0f 05 <44> 89 c7 48 89 04 24 e8 e3 e7 ff ff 48 8b 04 24 eb 97 66 2e 0f 1f
RSP: 002b:00007ffc5547d4d0 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6
RAX: ffffffffffffffda RBX: 0000000000000018 RCX: 00007f1f0d6ac821
RDX: 00007ffc5547d510 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007ffc5547d59c R08: 0000000000000000 R09: 00007ffc55497080
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000032
R13: 00000000002443d7 R14: 0000000000000003 R15: 00007ffc5547d600
Allocated by task 1709:
kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38
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 mm/kasan/common.c:472 [inline]
__kasan_kmalloc+0xa6/0xd0 mm/kasan/common.c:522
kasan_kmalloc include/linux/kasan.h:269 [inline]
__do_kmalloc mm/slab.c:3702 [inline]
__kmalloc+0x209/0x4d0 mm/slab.c:3711
kmalloc include/linux/slab.h:595 [inline]
proc_do_submiturb+0x2a49/0x35f0 drivers/usb/core/devio.c:1816
proc_submiturb drivers/usb/core/devio.c:1975 [inline]
usbdev_do_ioctl drivers/usb/core/devio.c:2671 [inline]
usbdev_ioctl+0x692/0x36c0 drivers/usb/core/devio.c:2791
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl fs/ioctl.c:860 [inline]
__x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
The buggy address belongs to the object at ffff8880245d3cc0
which belongs to the cache kmalloc-32 of size 32
The buggy address is located 0 bytes inside of
32-byte region [ffff8880245d3cc0, ffff8880245d3ce0)
The buggy address belongs to the page:
page:ffffea00009174c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880245d3fc1 pfn:0x245d3
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea0000546a48 ffffea0001feeec8 ffff888010c40100
raw: ffff8880245d3fc1 ffff8880245d3000 000000010000003d 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x2420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 1, ts 14789827737, free_ts 0
prep_new_page mm/page_alloc.c:2418 [inline]
get_page_from_freelist+0xa72/0x2f50 mm/page_alloc.c:4149
__alloc_pages+0x1b2/0x500 mm/page_alloc.c:5369
__alloc_pages_node include/linux/gfp.h:570 [inline]
kmem_getpages mm/slab.c:1377 [inline]
cache_grow_begin+0x75/0x470 mm/slab.c:2593
cache_alloc_refill+0x27f/0x380 mm/slab.c:2965
____cache_alloc mm/slab.c:3048 [inline]
____cache_alloc mm/slab.c:3031 [inline]
__do_cache_alloc mm/slab.c:3275 [inline]
slab_alloc mm/slab.c:3316 [inline]
__do_kmalloc mm/slab.c:3700 [inline]
__kmalloc+0x3b3/0x4d0 mm/slab.c:3711
kmalloc include/linux/slab.h:595 [inline]
kzalloc include/linux/slab.h:724 [inline]
kobject_get_path+0x3e/0x70 lib/kobject.c:179
kobject_uevent_env+0x265/0x1650 lib/kobject_uevent.c:529
driver_register+0x2db/0x3a0 drivers/base/driver.c:179
__hid_register_driver+0x142/0x1d0 drivers/hid/hid-core.c:2553
do_one_initcall+0x103/0x650 init/main.c:1297
do_initcall_level init/main.c:1370 [inline]
do_initcalls init/main.c:1386 [inline]
do_basic_setup init/main.c:1405 [inline]
kernel_init_freeable+0x6b1/0x73a init/main.c:1610
kernel_init+0x1a/0x1d0 init/main.c:1499
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
page_owner free stack trace missing
Memory state around the buggy address:
ffff8880245d3b80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
ffff8880245d3c00: fb fb fb fb fc fc fc fc 00 00 fc fc fc fc fc fc
>ffff8880245d3c80: 00 00 fc fc fc fc fc fc 01 fc fc fc fc fc fc fc
^
ffff8880245d3d00: 00 00 01 fc fc fc fc fc 07 fc fc fc fc fc fc fc
ffff8880245d3d80: 07 fc fc fc fc fc fc fc 00 00 01 fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 03 54 f4 07 add 0x7(%rsp,%rsi,8),%edx
4: 85 c0 test %eax,%eax
6: 75 02 jne 0xa
8: 0f 0b ud2
a: 48 85 db test %rbx,%rbx
d: 0f 85 25 01 00 00 jne 0x138
13: 4c 89 f7 mov %r14,%rdi
16: e8 fc f7 ff ff callq 0xfffff817
1b: e8 37 4c 2d 00 callq 0x2d4c57
20: fb sti
21: 65 48 8b 1c 25 40 70 mov %gs:0x27040,%rbx
28: 02 00
* 2a: 48 8d bb 80 15 00 00 lea 0x1580(%rbx),%rdi <-- trapping instruction
31: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
38: fc ff df
3b: 48 89 fa mov %rdi,%rdx
3e: 48 rex.W
3f: c1 .byte 0xc1