==================================================================
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 ffff88801ca05c80 by task syz-executor.3/25199
CPU: 0 PID: 25199 Comm: syz-executor.3 Not tainted 5.16.0-rc2-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/0x320 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:636
irq_exit_rcu+0x5/0x20 kernel/softirq.c:648
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: 43 79 f3 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 c7 44 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:ffffc90002aefae8 EFLAGS: 00000202
RAX: 00000000005e950b RBX: ffff888044b69d00 RCX: 1ffffffff1b22001
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc90002aefb30 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff817ddd38 R11: 0000000000000001 R12: ffff8880b9c3a7d8
R13: ffff88807a731d00 R14: ffff8880b9c39a80 R15: ffff8880b9c3a4b8
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:0x7f3a363fa811
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:00007ffd98f57780 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6
RAX: ffffffffffffffda RBX: 00000000000004d4 RCX: 00007f3a363fa811
RDX: 00007ffd98f577c0 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007ffd98f5784c R08: 0000000000000000 R09: 00007ffd98fb7080
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000032
R13: 00000000002c05b4 R14: 0000000000000002 R15: 00007ffd98f578b0
Allocated by task 10860:
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+0xa9/0xd0 mm/kasan/common.c:522
kmalloc include/linux/slab.h:595 [inline]
do_proc_bulk+0x2fc/0xba0 drivers/usb/core/devio.c:1292
proc_bulk drivers/usb/core/devio.c:1351 [inline]
usbdev_do_ioctl drivers/usb/core/devio.c:2625 [inline]
usbdev_ioctl+0x586/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 ffff88801ca05c80
which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes inside of
8-byte region [ffff88801ca05c80, ffff88801ca05c88)
The buggy address belongs to the page:
page:ffffea0000728140 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1ca05
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea00010c9d80 dead000000000003 ffff888010c41280
raw: 0000000000000000 0000000080660066 00000001ffffffff 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 19243, ts 1065369035566, free_ts 1064875580927
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+0x1a7/0x300 mm/mempolicy.c:2191
alloc_slab_page mm/slub.c:1793 [inline]
allocate_slab mm/slub.c:1930 [inline]
new_slab+0x32d/0x4a0 mm/slub.c:1993
___slab_alloc+0x918/0xfe0 mm/slub.c:3022
__slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3109
slab_alloc_node mm/slub.c:3200 [inline]
slab_alloc mm/slub.c:3242 [inline]
__kmalloc_track_caller+0x2e7/0x320 mm/slub.c:4925
kstrdup+0x36/0x70 mm/util.c:60
kstrdup_const+0x53/0x80 mm/util.c:83
__kernfs_new_node+0x9d/0x8b0 fs/kernfs/dir.c:581
kernfs_new_node fs/kernfs/dir.c:647 [inline]
kernfs_create_dir_ns+0x9c/0x220 fs/kernfs/dir.c:984
sysfs_create_dir_ns+0x128/0x290 fs/sysfs/dir.c:59
create_dir lib/kobject.c:89 [inline]
kobject_add_internal+0x2d2/0xa60 lib/kobject.c:255
kobject_add_varg lib/kobject.c:390 [inline]
kobject_init_and_add+0x101/0x160 lib/kobject.c:473
netdev_queue_add_kobject net/core/net-sysfs.c:1665 [inline]
netdev_queue_update_kobjects+0x1a2/0x460 net/core/net-sysfs.c:1710
register_queue_kobjects net/core/net-sysfs.c:1771 [inline]
netdev_register_kobject+0x35a/0x430 net/core/net-sysfs.c:2014
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1338 [inline]
free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1389
free_unref_page_prepare mm/page_alloc.c:3309 [inline]
free_unref_page_list+0x1a9/0xfa0 mm/page_alloc.c:3425
release_pages+0x3f4/0x1480 mm/swap.c:980
tlb_batch_pages_flush mm/mmu_gather.c:49 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:242 [inline]
tlb_flush_mmu mm/mmu_gather.c:249 [inline]
tlb_finish_mmu+0x165/0x8c0 mm/mmu_gather.c:340
exit_mmap+0x1ea/0x630 mm/mmap.c:3172
__mmput+0x122/0x4b0 kernel/fork.c:1113
mmput+0x56/0x60 kernel/fork.c:1134
free_bprm+0x65/0x2e0 fs/exec.c:1481
kernel_execve+0x380/0x460 fs/exec.c:1978
call_usermodehelper_exec_async+0x2e3/0x580 kernel/umh.c:112
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Memory state around the buggy address:
ffff88801ca05b80: fc fc fa fc fc fc fc fa fc fc fc fc fb fc fc fc
ffff88801ca05c00: fc fb fc fc fc fc 00 fc fc fc fc fb fc fc fc fc
>ffff88801ca05c80: 01 fc fc fc fc 00 fc fc fc fc fb fc fc fc fc 00
^
ffff88801ca05d00: fc fc fc fc fb fc fc fc fc 00 fc fc fc fc 00 fc
ffff88801ca05d80: fc fc fc fb fc fc fc fc fb fc fc fc fc 00 fc fc
==================================================================
----------------
Code disassembly (best guess), 2 bytes skipped:
0: f3 07 repz (bad)
2: 85 c0 test %eax,%eax
4: 75 02 jne 0x8
6: 0f 0b ud2
8: 48 85 db test %rbx,%rbx
b: 0f 85 25 01 00 00 jne 0x136
11: 4c 89 f7 mov %r14,%rdi
14: e8 fc f7 ff ff callq 0xfffff815
19: e8 c7 44 2d 00 callq 0x2d44e5
1e: fb sti
1f: 65 48 8b 1c 25 40 70 mov %gs:0x27040,%rbx
26: 02 00
* 28: 48 8d bb 80 15 00 00 lea 0x1580(%rbx),%rdi <-- trapping instruction
2f: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
36: fc ff df
39: 48 89 fa mov %rdi,%rdx
3c: 48 rex.W
3d: c1 .byte 0xc1