================================================================== 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 ffff88801d5da028 by task syz-fuzzer/3605 CPU: 0 PID: 3605 Comm: syz-fuzzer 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+0x45/0xc0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 RIP: 0033:0x4f055c Code: 89 44 24 08 48 89 44 24 10 0f 1f 44 00 00 e8 3b d6 f5 ff 48 8b 44 24 18 48 89 44 24 30 31 c9 eb 1e 48 8b 54 24 30 48 8b 1c c2 <48> 8b 74 24 20 48 89 1c f2 48 89 34 c2 48 89 d0 48 8b 4c 24 28 48 RSP: 002b:000000c0244ad0c8 EFLAGS: 00000206 RAX: 0000000000001185 RBX: 000000000000b02b RCX: 000000000000f3ac RDX: 000000c028550000 RSI: 000000000000016a RDI: 000000c01fd18ab0 RBP: 000000c0244ad100 R08: 0000000000000001 R09: 000000000007a000 R10: bd45b07b1484cf06 R11: bd45b07b14828a33 R12: 0000000000000002 R13: 0000000000b47f00 R14: 0000000000000000 R15: 000000000046c3c0 Allocated by task 13891: 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] proc_do_submiturb+0x2a56/0x3600 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 ffff88801d5da028 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes inside of 8-byte region [ffff88801d5da028, ffff88801d5da030) The buggy address belongs to the page: page:ffffea0000757680 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1d5da flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea000076d000 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 1, ts 9625175577, free_ts 9619425201 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_page_interleave+0x1e/0x200 mm/mempolicy.c:2116 alloc_pages+0x2b1/0x310 mm/mempolicy.c:2266 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 usb_get_descriptor+0xdd/0x1d0 drivers/usb/core/message.c:793 usb_get_configuration+0x3ac/0x3b30 drivers/usb/core/config.c:928 usb_enumerate_device drivers/usb/core/hub.c:2398 [inline] usb_new_device+0x583/0x7d0 drivers/usb/core/hub.c:2536 register_root_hub drivers/usb/core/hcd.c:1010 [inline] usb_add_hcd.cold+0x132b/0x16fd drivers/usb/core/hcd.c:2959 vhci_hcd_probe+0x1c9/0x3a0 drivers/usb/usbip/vhci_hcd.c:1376 platform_probe+0xfc/0x1f0 drivers/base/platform.c:1416 call_driver_probe drivers/base/dd.c:517 [inline] really_probe+0x245/0xcc0 drivers/base/dd.c:596 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: ffff88801d5d9f00: 00 00 00 00 00 00 fc fc fc fc 00 00 00 00 00 00 ffff88801d5d9f80: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801d5da000: fa fc fc fc fc 01 fc fc fc fc 00 fc fc fc fc 00 ^ ffff88801d5da080: fc fc fc fc fa fc fc fc fc 00 fc fc fc fc 00 fc ffff88801d5da100: fc fc fc 00 fc fc fc fc fa fc fc fc fc 00 fc fc ==================================================================