================================================================== 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 ffff88801a6fd500 by task syz-executor.0/3633 CPU: 0 PID: 3633 Comm: syz-executor.0 Not tainted 5.16.0-rc4-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/0x2ed 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: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_pc+0x37/0x60 kernel/kcov.c:200 Code: 81 e1 00 01 00 00 65 48 8b 14 25 40 70 02 00 a9 00 01 ff 00 74 0e 85 c9 74 35 8b 82 a4 15 00 00 85 c0 74 2b 8b 82 80 15 00 00 <83> f8 02 75 20 48 8b 8a 88 15 00 00 8b 92 84 15 00 00 48 8b 01 48 RSP: 0018:ffffc90002847758 EFLAGS: 00000246 RAX: 0000000000000000 RBX: dffffc0000000000 RCX: 0000000000000000 RDX: ffff88807c4c2240 RSI: ffffffff81ab7edd RDI: 0000000000000003 RBP: 1ffff92000508eed R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff81ab7ed3 R11: 0000000000000000 R12: ffff888074dc4210 R13: 00007f52fd239000 R14: 800000006dc6b007 R15: 0000000000000001 __pte_needs_invert arch/x86/include/asm/pgtable-invert.h:18 [inline] protnone_mask arch/x86/include/asm/pgtable-invert.h:24 [inline] pte_pfn arch/x86/include/asm/pgtable.h:186 [inline] vm_normal_page+0x9d/0x2a0 mm/memory.c:611 copy_present_pte mm/memory.c:948 [inline] copy_pte_range mm/memory.c:1073 [inline] copy_pmd_range mm/memory.c:1159 [inline] copy_pud_range mm/memory.c:1196 [inline] copy_p4d_range mm/memory.c:1220 [inline] copy_page_range+0xdaa/0x42c0 mm/memory.c:1293 dup_mmap kernel/fork.c:609 [inline] dup_mm+0xa4e/0x13e0 kernel/fork.c:1450 copy_mm kernel/fork.c:1502 [inline] copy_process+0x6fed/0x75a0 kernel/fork.c:2191 kernel_clone+0xe7/0xab0 kernel/fork.c:2582 __do_sys_clone+0xc8/0x110 kernel/fork.c:2699 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:0x7f52fdeff48b 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:00007ffdc754c7c0 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f52fdeff48b RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011 RBP: 0000000000000001 R08: 0000000000000000 R09: 00005555570ae400 R10: 00005555570ae6d0 R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000000001 R15: 00007ffdc754c8a0 Allocated by task 10609: 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+0xa6/0xd0 mm/kasan/common.c:522 kasan_kmalloc include/linux/kasan.h:269 [inline] __do_kmalloc mm/slab.c:3702 [inline] __kmalloc+0x209/0x4d0 mm/slab.c:3711 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 ffff88801a6fd500 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff88801a6fd500, ffff88801a6fd520) The buggy address belongs to the page: page:ffffea000069bf40 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88801a6fdfc1 pfn:0x1a6fd flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea000074fac8 ffffea00004cf148 ffff888010c40100 raw: ffff88801a6fdfc1 ffff88801a6fd000 000000010000003f 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 0x2420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 54, ts 7744289553, free_ts 0 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_node include/linux/gfp.h:570 [inline] kmem_getpages mm/slab.c:1377 [inline] cache_grow_begin+0x75/0x470 mm/slab.c:2593 cache_alloc_refill+0x27f/0x380 mm/slab.c:2965 ____cache_alloc mm/slab.c:3048 [inline] ____cache_alloc mm/slab.c:3031 [inline] __do_cache_alloc mm/slab.c:3275 [inline] slab_alloc mm/slab.c:3316 [inline] __do_kmalloc mm/slab.c:3700 [inline] __kmalloc+0x3b3/0x4d0 mm/slab.c:3711 kmalloc include/linux/slab.h:595 [inline] kzalloc include/linux/slab.h:724 [inline] lsm_task_alloc security/security.c:614 [inline] security_task_alloc+0x10b/0x250 security/security.c:1644 copy_process+0x2132/0x75a0 kernel/fork.c:2173 kernel_clone+0xe7/0xab0 kernel/fork.c:2582 kernel_thread+0xb5/0xf0 kernel/fork.c:2634 call_usermodehelper_exec_work kernel/umh.c:174 [inline] call_usermodehelper_exec_work+0xcc/0x180 kernel/umh.c:160 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 page_owner free stack trace missing Memory state around the buggy address: ffff88801a6fd400: 00 00 01 fc fc fc fc fc 00 00 fc fc fc fc fc fc ffff88801a6fd480: 05 fc fc fc fc fc fc fc 00 00 01 fc fc fc fc fc >ffff88801a6fd500: 01 fc fc fc fc fc fc fc 05 fc fc fc fc fc fc fc ^ ffff88801a6fd580: 00 00 01 fc fc fc fc fc 00 00 01 fc fc fc fc fc ffff88801a6fd600: 00 01 fc fc fc fc fc fc 06 fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 81 e1 00 01 00 00 and $0x100,%ecx 6: 65 48 8b 14 25 40 70 mov %gs:0x27040,%rdx d: 02 00 f: a9 00 01 ff 00 test $0xff0100,%eax 14: 74 0e je 0x24 16: 85 c9 test %ecx,%ecx 18: 74 35 je 0x4f 1a: 8b 82 a4 15 00 00 mov 0x15a4(%rdx),%eax 20: 85 c0 test %eax,%eax 22: 74 2b je 0x4f 24: 8b 82 80 15 00 00 mov 0x1580(%rdx),%eax * 2a: 83 f8 02 cmp $0x2,%eax <-- trapping instruction 2d: 75 20 jne 0x4f 2f: 48 8b 8a 88 15 00 00 mov 0x1588(%rdx),%rcx 36: 8b 92 84 15 00 00 mov 0x1584(%rdx),%edx 3c: 48 8b 01 mov (%rcx),%rax 3f: 48 rex.W