================================================================== 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 ffff88801e030ed8 by task syz-executor.0/3632 CPU: 0 PID: 3632 Comm: syz-executor.0 Not tainted 5.16.0-rc6-next-20211224-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+0xa5/0x3ed mm/kasan/report.c:255 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 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+0x67c/0xa30 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:__sanitizer_cov_trace_const_cmp4+0xc/0x70 kernel/kcov.c:286 Code: 00 00 00 48 89 7c 30 e8 48 89 4c 30 f0 4c 89 54 d8 20 48 89 10 5b c3 0f 1f 80 00 00 00 00 41 89 f8 bf 03 00 00 00 4c 8b 14 24 <89> f1 65 48 8b 34 25 00 70 02 00 e8 14 f9 ff ff 84 c0 74 4b 48 8b RSP: 0018:ffffc9000286f800 EFLAGS: 00000246 RAX: ffff88801d0a22a0 RBX: 0000000000000000 RCX: ffffffff81b0dc46 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000000 R09: ffff88801d0a22a3 R10: ffffffff81b0dc7a R11: 0000000000000000 R12: 0000000000000000 R13: dffffc0000000000 R14: 0000000000000001 R15: ffff88801d0a22a0 copy_pte_range mm/memory.c:1045 [inline] copy_pmd_range mm/memory.c:1160 [inline] copy_pud_range mm/memory.c:1197 [inline] copy_p4d_range mm/memory.c:1221 [inline] copy_page_range+0x10fa/0x4490 mm/memory.c:1294 dup_mmap kernel/fork.c:612 [inline] dup_mm+0xa4e/0x13e0 kernel/fork.c:1453 copy_mm kernel/fork.c:1505 [inline] copy_process+0x6bf4/0x7490 kernel/fork.c:2176 kernel_clone+0xe7/0xab0 kernel/fork.c:2620 __do_sys_clone+0xc1/0x100 kernel/fork.c:2737 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:0x7f1d58c8648b 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:00007fff13ffd700 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f1d58c8648b RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011 RBP: 0000000000000001 R08: 0000000000000000 R09: 00005555558fc400 R10: 00005555558fc6d0 R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000000001 R15: 00007fff13ffd7e0 Allocated by task 6419: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] ____kasan_kmalloc mm/kasan/common.c:515 [inline] ____kasan_kmalloc mm/kasan/common.c:474 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:524 kmalloc include/linux/slab.h:586 [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 ffff88801e030ed8 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes inside of 8-byte region [ffff88801e030ed8, ffff88801e030ee0) The buggy address belongs to the page: page:ffffea0000780c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1e030 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 dead000000000100 dead000000000122 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 0x12c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY), pid 1143, ts 9287414724, free_ts 9177899442 prep_new_page mm/page_alloc.c:2434 [inline] get_page_from_freelist+0xa72/0x2f40 mm/page_alloc.c:4165 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5379 alloc_pages+0x1aa/0x310 mm/mempolicy.c:2271 alloc_slab_page mm/slub.c:1799 [inline] allocate_slab mm/slub.c:1944 [inline] new_slab+0x28d/0x380 mm/slub.c:2004 ___slab_alloc+0x6be/0xd60 mm/slub.c:3018 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3105 slab_alloc_node mm/slub.c:3196 [inline] slab_alloc mm/slub.c:3238 [inline] kmem_cache_alloc_trace+0x289/0x2c0 mm/slub.c:3255 kmalloc include/linux/slab.h:581 [inline] usb_control_msg+0xb9/0x4a0 drivers/usb/core/message.c:143 get_port_status drivers/usb/core/hub.c:580 [inline] hub_ext_port_status+0x112/0x450 drivers/usb/core/hub.c:597 hub_port_status drivers/usb/core/hub.c:619 [inline] hub_activate+0x853/0x1af0 drivers/usb/core/hub.c:1129 process_one_work+0x9ac/0x1650 kernel/workqueue.c:2307 worker_thread+0x657/0x1110 kernel/workqueue.c:2454 kthread+0x2e9/0x3a0 kernel/kthread.c:377 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1352 [inline] free_pcp_prepare+0x414/0xb60 mm/page_alloc.c:1404 free_unref_page_prepare mm/page_alloc.c:3325 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3404 __vunmap+0x854/0xd30 mm/vmalloc.c:2637 free_work+0x58/0x70 mm/vmalloc.c:97 process_one_work+0x9ac/0x1650 kernel/workqueue.c:2307 worker_thread+0x657/0x1110 kernel/workqueue.c:2454 kthread+0x2e9/0x3a0 kernel/kthread.c:377 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff88801e030d80: fc fc fc 00 fc fc fc fc 00 fc fc fc fc 00 fc fc ffff88801e030e00: fc fc 00 fc fc fc fc 00 fc fc fc fc fb fc fc fc >ffff88801e030e80: fc 00 fc fc fc fc 00 fc fc fc fc 01 fc fc fc fc ^ ffff88801e030f00: 00 fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc 00 ffff88801e030f80: fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 00 00 add %al,(%rax) 2: 00 48 89 add %cl,-0x77(%rax) 5: 7c 30 jl 0x37 7: e8 48 89 4c 30 callq 0x304c8954 c: f0 4c 89 54 d8 20 lock mov %r10,0x20(%rax,%rbx,8) 12: 48 89 10 mov %rdx,(%rax) 15: 5b pop %rbx 16: c3 retq 17: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 1e: 41 89 f8 mov %edi,%r8d 21: bf 03 00 00 00 mov $0x3,%edi 26: 4c 8b 14 24 mov (%rsp),%r10 * 2a: 89 f1 mov %esi,%ecx <-- trapping instruction 2c: 65 48 8b 34 25 00 70 mov %gs:0x27000,%rsi 33: 02 00 35: e8 14 f9 ff ff callq 0xfffff94e 3a: 84 c0 test %al,%al 3c: 74 4b je 0x89 3e: 48 rex.W 3f: 8b .byte 0x8b