==================================================================
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 ffff88801cee1fc8 by task syz-executor.1/26222
CPU: 1 PID: 26222 Comm: syz-executor.1 Not tainted 5.15.0-next-20211108-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:_compound_head include/linux/page-flags.h:200 [inline]
RIP: 0010:get_page include/linux/mm.h:1204 [inline]
RIP: 0010:copy_present_pte mm/memory.c:961 [inline]
RIP: 0010:copy_pte_range mm/memory.c:1077 [inline]
RIP: 0010:copy_pmd_range mm/memory.c:1163 [inline]
RIP: 0010:copy_pud_range mm/memory.c:1200 [inline]
RIP: 0010:copy_p4d_range mm/memory.c:1224 [inline]
RIP: 0010:copy_page_range+0xe23/0x42c0 mm/memory.c:1297
Code: 20 48 89 44 24 60 0f 84 b2 05 00 00 e8 76 d2 c9 ff 48 8b 44 24 60 48 c1 e8 03 42 80 3c 28 00 0f 85 f8 2b 00 00 4d 8b 7c 24 08 <31> ff 4d 89 fe 41 83 e6 01 4c 89 f6 e8 dc d4 c9 ff 4d 85 f6 0f 85
RSP: 0018:ffffc90002cdf800 EFLAGS: 00000246
RAX: 1ffffd40003efd29 RBX: 800000007dfa5007 RCX: 0000000000000000
RDX: ffff88802d653a80 RSI: ffffffff81adf8da RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000020 R09: ffff8880778f7783
R10: ffffffff81adf8c1 R11: 0000000000000000 R12: ffffea0001f7e940
R13: dffffc0000000000 R14: 0000000000000028 R15: 0000000000000000
dup_mmap kernel/fork.c:609 [inline]
dup_mm+0xa4e/0x13e0 kernel/fork.c:1501
copy_mm kernel/fork.c:1553 [inline]
copy_process+0x6fed/0x75a0 kernel/fork.c:2242
kernel_clone+0xe7/0xab0 kernel/fork.c:2633
__do_sys_clone+0xc8/0x110 kernel/fork.c:2750
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:0x7f3136c530db
Code: ed 0f 85 60 01 00 00 64 4c 8b 0c 25 10 00 00 00 45 31 c0 4d 8d 91 d0 02 00 00 31 d2 31 f6 bf 11 00 20 01 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 89 00 00 00 41 89 c5 85 c0 0f 85 90 00 00
RSP: 002b:00007ffd42108520 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f3136c530db
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000555557209400
R10: 00005555572096d0 R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000000001 R14: 0000000000000001 R15: 00007ffd42108600
Allocated by task 7958:
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]
proc_do_submiturb+0x2a7d/0x3630 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 ffff88801cee1fc8
which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes inside of
8-byte region [ffff88801cee1fc8, ffff88801cee1fd0)
The buggy address belongs to the page:
page:ffffea000073b840 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1cee1
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea0000624380 dead000000000002 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 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 54, ts 8872924960, free_ts 8775527259
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+0x93/0x120 fs/kernfs/dir.c:647
kernfs_create_link+0xcb/0x230 fs/kernfs/symlink.c:39
sysfs_do_create_link_sd+0x90/0x140 fs/sysfs/symlink.c:44
sysfs_do_create_link fs/sysfs/symlink.c:80 [inline]
sysfs_create_link+0x5f/0xc0 fs/sysfs/symlink.c:92
device_add_disk+0x4ac/0xef0 block/genhd.c:456
sd_probe+0xace/0x10c0 drivers/scsi/sd.c:3582
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+0x19/0x690 mm/page_alloc.c:3388
__vunmap+0x781/0xb70 mm/vmalloc.c:2632
free_work+0x58/0x70 mm/vmalloc.c:95
process_one_work+0x9b2/0x1690 kernel/workqueue.c:2298
worker_thread+0x658/0x11f0 kernel/workqueue.c:2445
kthread+0x405/0x4f0 kernel/kthread.c:327
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Memory state around the buggy address:
ffff88801cee1e80: fc 00 fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc
ffff88801cee1f00: 00 fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc 00
>ffff88801cee1f80: fc fc fc fc 00 fc fc fc fc 01 fc fc fc fc fc fc
^
ffff88801cee2000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88801cee2080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 20 48 89 and %cl,-0x77(%rax)
3: 44 24 60 rex.R and $0x60,%al
6: 0f 84 b2 05 00 00 je 0x5be
c: e8 76 d2 c9 ff callq 0xffc9d287
11: 48 8b 44 24 60 mov 0x60(%rsp),%rax
16: 48 c1 e8 03 shr $0x3,%rax
1a: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1)
1f: 0f 85 f8 2b 00 00 jne 0x2c1d
25: 4d 8b 7c 24 08 mov 0x8(%r12),%r15
* 2a: 31 ff xor %edi,%edi <-- trapping instruction
2c: 4d 89 fe mov %r15,%r14
2f: 41 83 e6 01 and $0x1,%r14d
33: 4c 89 f6 mov %r14,%rsi
36: e8 dc d4 c9 ff callq 0xffc9d517
3b: 4d 85 f6 test %r14,%r14
3e: 0f .byte 0xf
3f: 85 .byte 0x85