================================================================== 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 ffff8880840cfd48 by task syz-executor.3/19627 CPU: 0 PID: 19627 Comm: syz-executor.3 Not tainted 5.16.0-rc1-next-20211118-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:__sanitizer_cov_trace_const_cmp8+0x69/0x70 kernel/kcov.c:296 Code: 3c cd 28 00 00 00 48 39 fe 72 1f 48 83 c2 01 4c 89 44 38 e8 48 c7 44 38 e0 07 00 00 00 48 89 4c 38 f0 4e 89 54 c8 20 48 89 10 66 0f 1f 44 00 00 41 89 f8 bf 03 00 00 00 4c 8b 14 24 89 f1 65 RSP: 0018:ffffc90005c57a20 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 00fff0000000203a RCX: 00fff0000000203a RDX: 0000000000000000 RSI: ffff8880806657c0 RDI: 0000000000000003 RBP: ffffea00024eaf40 R08: ffffffffffffffff R09: 0000000000000000 R10: ffffffff81a03b02 R11: 0000000000000000 R12: 000000000000038c R13: ffffea00024eaf40 R14: 0000000000000000 R15: 0000000000000000 PageHead include/linux/page-flags.h:687 [inline] compound_nr include/linux/mm.h:962 [inline] folio_nr_pages include/linux/mm.h:1643 [inline] folio_file_page include/linux/pagemap.h:570 [inline] pagecache_get_page+0xc2/0x1a0 mm/folio-compat.c:128 find_get_page_flags include/linux/pagemap.h:445 [inline] __find_get_block_slow fs/buffer.c:202 [inline] __find_get_block fs/buffer.c:1345 [inline] __find_get_block+0x4ba/0xdb0 fs/buffer.c:1339 sb_find_get_block include/linux/buffer_head.h:340 [inline] recently_deleted fs/ext4/ialloc.c:689 [inline] find_inode_bit+0x230/0x580 fs/ext4/ialloc.c:731 __ext4_new_inode+0xc64/0x5ba0 fs/ext4/ialloc.c:1066 ext4_symlink+0x485/0xd40 fs/ext4/namei.c:3293 vfs_symlink fs/namei.c:4248 [inline] vfs_symlink+0x45d/0x6c0 fs/namei.c:4233 do_symlinkat+0x261/0x2e0 fs/namei.c:4277 __do_sys_symlink fs/namei.c:4299 [inline] __se_sys_symlink fs/namei.c:4297 [inline] __x64_sys_symlink+0x75/0x90 fs/namei.c:4297 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:0x7f2ba7c203f7 Code: 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 58 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd92277388 EFLAGS: 00000202 ORIG_RAX: 0000000000000058 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f2ba7c203f7 RDX: ffffffffffffffbc RSI: 00007f2ba7c7b00e RDI: 00007f2ba7c7a1dd RBP: 0000000000000000 R08: 0000000000000000 R09: 00007ffd92276e00 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000001 R13: 0000000000000001 R14: 0000000000000001 R15: 00007ffd92277450 Allocated by task 19626: 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 ffff8880840cfd48 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes inside of 8-byte region [ffff8880840cfd48, ffff8880840cfd50) The buggy address belongs to the page: page:ffffea00021033c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x840cf flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00006b8b80 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 0x12c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY), pid 9164, ts 232251446859, free_ts 232204870130 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] kmem_cache_alloc_trace+0x289/0x2c0 mm/slub.c:3259 kmalloc include/linux/slab.h:590 [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+0x4da/0x1a20 drivers/usb/core/hub.c:1126 hub_resume+0xab/0x3e0 drivers/usb/core/hub.c:3885 usb_resume_interface.part.0.isra.0+0x271/0x360 drivers/usb/core/driver.c:1358 usb_resume_interface drivers/usb/core/driver.c:1518 [inline] usb_resume_both+0x2a7/0x8d0 drivers/usb/core/driver.c:1518 __rpm_callback+0xc9/0x330 drivers/base/power/runtime.c:377 rpm_callback+0x1da/0x220 drivers/base/power/runtime.c:504 rpm_resume+0xf5d/0x1bd0 drivers/base/power/runtime.c:879 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 mm_free_pgd kernel/fork.c:647 [inline] __mmdrop+0xcb/0x3f0 kernel/fork.c:749 mmdrop include/linux/sched/mm.h:49 [inline] __mmput+0x3f1/0x4b0 kernel/fork.c:1174 mmput+0x56/0x60 kernel/fork.c:1185 exit_mm kernel/exit.c:507 [inline] do_exit+0xb27/0x2b40 kernel/exit.c:819 do_group_exit+0x125/0x310 kernel/exit.c:929 get_signal+0x34c/0x28b0 kernel/signal.c:2837 arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:868 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop kernel/entry/common.c:172 [inline] exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff8880840cfc00: fc 00 fc fc fc fc fa fc fc fc fc fa fc fc fc fc ffff8880840cfc80: fa fc fc fc fc fa fc fc fc fc fb fc fc fc fc fa >ffff8880840cfd00: fc fc fc fc fa fc fc fc fc 01 fc fc fc fc 00 fc ^ ffff8880840cfd80: fc fc fc 00 fc fc fc fc 00 fc fc fc fc 00 fc fc ffff8880840cfe00: fc fc 00 fc fc fc fc 00 fc fc fc fc fa fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 3c cd cmp $0xcd,%al 2: 28 00 sub %al,(%rax) 4: 00 00 add %al,(%rax) 6: 48 39 fe cmp %rdi,%rsi 9: 72 1f jb 0x2a b: 48 83 c2 01 add $0x1,%rdx f: 4c 89 44 38 e8 mov %r8,-0x18(%rax,%rdi,1) 14: 48 c7 44 38 e0 07 00 movq $0x7,-0x20(%rax,%rdi,1) 1b: 00 00 1d: 48 89 4c 38 f0 mov %rcx,-0x10(%rax,%rdi,1) 22: 4e 89 54 c8 20 mov %r10,0x20(%rax,%r9,8) 27: 48 89 10 mov %rdx,(%rax) * 2a: c3 retq <-- trapping instruction 2b: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 31: 41 89 f8 mov %edi,%r8d 34: bf 03 00 00 00 mov $0x3,%edi 39: 4c 8b 14 24 mov (%rsp),%r10 3d: 89 f1 mov %esi,%ecx 3f: 65 gs