usb usb9: usbfs: process 17208 (syz-executor.0) did not claim interface 0 before use ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:377 [inline] BUG: KASAN: slab-out-of-bounds in usb_hcd_poll_rh_status+0x387/0x6f0 drivers/usb/core/hcd.c:771 Write of size 2 at addr ffff8880ae1e4240 by task syz-executor.5/17209 CPU: 0 PID: 17209 Comm: syz-executor.5 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report+0x8f/0xa0 mm/kasan/report.c:412 memcpy+0x35/0x50 mm/kasan/kasan.c:303 memcpy include/linux/string.h:377 [inline] usb_hcd_poll_rh_status+0x387/0x6f0 drivers/usb/core/hcd.c:771 call_timer_fn+0x177/0x700 kernel/time/timer.c:1338 expire_timers+0x243/0x4e0 kernel/time/timer.c:1375 __run_timers kernel/time/timer.c:1696 [inline] run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1709 __do_softirq+0x265/0x980 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1098 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [inline] RIP: 0010:lock_release+0x429/0x8b0 kernel/locking/lockdep.c:3930 Code: 84 08 00 00 00 00 00 00 48 c1 e8 03 80 3c 10 00 0f 85 95 03 00 00 48 83 3d 7b 34 a6 08 00 0f 84 cc 01 00 00 48 8b 3c 24 57 9d <0f> 1f 44 00 00 48 b8 00 00 00 00 00 fc ff df 49 c7 04 04 00 00 00 RSP: 0018:ffff88804a137690 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff13e3051 RBX: ffff8880a9504140 RCX: 1ffff110152a093e RDX: dffffc0000000000 RSI: 0000000000000002 RDI: 0000000000000286 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff11009426ed5 R13: 62d1b169e47f45c6 R14: ffff8880a9504140 R15: 0000000000000002 page_remove_rmap+0xe5/0x120 mm/rmap.c:1297 zap_pte_range mm/memory.c:1350 [inline] zap_pmd_range mm/memory.c:1463 [inline] zap_pud_range mm/memory.c:1492 [inline] zap_p4d_range mm/memory.c:1513 [inline] unmap_page_range+0x147d/0x2c50 mm/memory.c:1534 unmap_single_vma+0x198/0x300 mm/memory.c:1579 unmap_vmas+0xa9/0x180 mm/memory.c:1609 exit_mmap+0x2b9/0x530 mm/mmap.c:3093 __mmput kernel/fork.c:1016 [inline] mmput+0x14e/0x4a0 kernel/fork.c:1037 exit_mm kernel/exit.c:549 [inline] do_exit+0xaec/0x2be0 kernel/exit.c:857 do_group_exit+0x125/0x310 kernel/exit.c:967 get_signal+0x3f2/0x1f70 kernel/signal.c:2589 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:799 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fbbf912ea04 Code: Bad RIP value. RSP: 002b:00007fbbf66f0cc0 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 RAX: 0000000000000003 RBX: 6666666666666667 RCX: 00007fbbf912ea04 RDX: 0000000000028101 RSI: 00007fbbf66f0d60 RDI: 00000000ffffff9c RBP: 00007fbbf66f0d60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000028101 R13: 00007ffc6bdda69f R14: 00007fbbf66f1300 R15: 0000000000022000 Allocated by task 17208: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15a/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] proc_do_submiturb+0x2d17/0x3b00 drivers/usb/core/devio.c:1673 proc_submiturb drivers/usb/core/devio.c:1827 [inline] usbdev_do_ioctl+0x773/0x3030 drivers/usb/core/devio.c:2481 usbdev_ioctl+0x21/0x30 drivers/usb/core/devio.c:2585 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 4705: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 kobject_uevent_env+0x2a5/0x1480 lib/kobject_uevent.c:623 kobject_synth_uevent+0x700/0x820 lib/kobject_uevent.c:208 uevent_store+0x21/0x70 drivers/base/core.c:1257 dev_attr_store+0x56/0x80 drivers/base/core.c:966 sysfs_kf_write+0x110/0x160 fs/sysfs/file.c:140 kernfs_fop_write+0x2b0/0x470 fs/kernfs/file.c:316 __vfs_write+0xf7/0x770 fs/read_write.c:485 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880ae1e4240 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880ae1e4240, ffff8880ae1e4260) The buggy address belongs to the page: page:ffffea0002b87900 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff8880ae1e4fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002bf4548 ffffea0002d1b108 ffff88813bff01c0 raw: ffff8880ae1e4fc1 ffff8880ae1e4000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880ae1e4100: 05 fc fc fc fc fc fc fc 05 fc fc fc fc fc fc fc ffff8880ae1e4180: fb fb fb fb fc fc fc fc 06 fc fc fc fc fc fc fc >ffff8880ae1e4200: 06 fc fc fc fc fc fc fc 01 fc fc fc fc fc fc fc ^ ffff8880ae1e4280: 06 fc fc fc fc fc fc fc 05 fc fc fc fc fc fc fc ffff8880ae1e4300: fb fb fb fb fc fc fc fc 00 fc fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 84 08 test %cl,(%rax) 2: 00 00 add %al,(%rax) 4: 00 00 add %al,(%rax) 6: 00 00 add %al,(%rax) 8: 48 c1 e8 03 shr $0x3,%rax c: 80 3c 10 00 cmpb $0x0,(%rax,%rdx,1) 10: 0f 85 95 03 00 00 jne 0x3ab 16: 48 83 3d 7b 34 a6 08 cmpq $0x0,0x8a6347b(%rip) # 0x8a63499 1d: 00 1e: 0f 84 cc 01 00 00 je 0x1f0 24: 48 8b 3c 24 mov (%rsp),%rdi 28: 57 push %rdi 29: 9d popfq * 2a: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) <-- trapping instruction 2f: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 36: fc ff df 39: 49 rex.WB 3a: c7 .byte 0xc7 3b: 04 04 add $0x4,%al 3d: 00 00 add %al,(%rax)