usb usb9: usbfs: process 13669 (syz-executor.5) did not claim interface 0 before use loop3: p1 < > p2 p3 < p5 p6 > p4 loop3: p2 size 1073741824 extends beyond EOD, truncated ================================================================== 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 ffff88808f1e16c0 by task syz-executor.2/8131 CPU: 1 PID: 8131 Comm: syz-executor.2 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:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xa3/0xe0 kernel/locking/spinlock.c:184 Code: 48 c7 c0 88 82 f1 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 2f 48 83 3d 7c 31 d8 01 00 74 15 48 89 df 57 9d <0f> 1f 44 00 00 eb b2 e8 fb eb e6 f8 eb c0 0f 0b 0f 0b 48 c7 c7 88 RSP: 0018:ffff8880af1a7b98 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff13e3051 RBX: 0000000000000286 RCX: 1ffff11013ede16f RDX: dffffc0000000000 RSI: ffff88809f6f0b58 RDI: 0000000000000286 RBP: ffffffff8a027840 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880a460c3c0 R13: ffff8880af1a7c20 R14: 0000000000000000 R15: 0000000000000000 spin_unlock_irqrestore include/linux/spinlock.h:384 [inline] quarantine_remove_cache+0x82/0x100 mm/kasan/quarantine.c:319 shutdown_cache+0xe/0x1e0 mm/slab_common.c:562 kmem_cache_destroy+0x267/0x310 mm/slab_common.c:927 p9_client_destroy+0x250/0x360 net/9p/client.c:1112 v9fs_session_close+0x45/0x2c0 fs/9p/v9fs.c:513 v9fs_kill_super+0x49/0x90 fs/9p/vfs_super.c:233 deactivate_locked_super+0x94/0x160 fs/super.c:329 deactivate_super+0x174/0x1a0 fs/super.c:360 cleanup_mnt+0x1a8/0x290 fs/namespace.c:1098 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 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:0x7fd1f558c4c7 Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffc14158f78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fd1f558c4c7 RDX: 00007ffc1415904b RSI: 000000000000000a RDI: 00007ffc14159040 RBP: 00007ffc14159040 R08: 00000000ffffffff R09: 00007ffc14158e10 R10: 0000555555662903 R11: 0000000000000246 R12: 00007fd1f55e41ea R13: 00007ffc1415a100 R14: 0000555555662810 R15: 00007ffc1415a140 Allocated by task 13669: __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 14: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 rh_call_control drivers/usb/core/hcd.c:728 [inline] rh_urb_enqueue drivers/usb/core/hcd.c:838 [inline] usb_hcd_submit_urb+0xb93/0x23c0 drivers/usb/core/hcd.c:1651 usb_submit_urb+0xb2f/0x13b0 drivers/usb/core/urb.c:571 usb_start_wait_urb+0x108/0x4c0 drivers/usb/core/message.c:57 usb_internal_control_msg drivers/usb/core/message.c:101 [inline] usb_control_msg+0x31c/0x4a0 drivers/usb/core/message.c:152 get_port_status drivers/usb/core/hub.c:577 [inline] hub_ext_port_status+0x112/0x4b0 drivers/usb/core/hub.c:594 hub_port_status drivers/usb/core/hub.c:616 [inline] hub_activate+0x50f/0x1a40 drivers/usb/core/hub.c:1098 hub_resume+0xa5/0x3b0 drivers/usb/core/hub.c:3761 usb_resume_interface.part.0.isra.0+0x271/0x390 drivers/usb/core/driver.c:1255 usb_resume_interface drivers/usb/core/driver.c:1415 [inline] usb_resume_both+0x26b/0x840 drivers/usb/core/driver.c:1415 __rpm_callback+0x1ee/0x830 drivers/base/power/runtime.c:333 rpm_callback+0x18f/0x230 drivers/base/power/runtime.c:463 rpm_resume+0x121c/0x1bd0 drivers/base/power/runtime.c:817 __pm_runtime_resume+0xb7/0x170 drivers/base/power/runtime.c:1038 pm_runtime_get_sync include/linux/pm_runtime.h:225 [inline] usb_autoresume_device+0x1e/0x60 drivers/usb/core/driver.c:1602 usb_remote_wakeup+0x8e/0xe0 drivers/usb/core/hub.c:3598 process_one_work+0x864/0x1570 kernel/workqueue.c:2153 worker_thread+0x64c/0x1130 kernel/workqueue.c:2296 kthread+0x33f/0x460 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff88808f1e16c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff88808f1e16c0, ffff88808f1e16e0) The buggy address belongs to the page: page:ffffea00023c7840 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff88808f1e1fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea00028d7908 ffffea000282fd48 ffff88813bff01c0 raw: ffff88808f1e1fc1 ffff88808f1e1000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808f1e1580: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88808f1e1600: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff88808f1e1680: fb fb fb fb fc fc fc fc 01 fc fc fc fc fc fc fc ^ ffff88808f1e1700: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88808f1e1780: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 48 c7 c0 88 82 f1 89 mov $0xffffffff89f18288,%rax 7: 48 ba 00 00 00 00 00 movabs $0xdffffc0000000000,%rdx e: fc ff df 11: 48 c1 e8 03 shr $0x3,%rax 15: 80 3c 10 00 cmpb $0x0,(%rax,%rdx,1) 19: 75 2f jne 0x4a 1b: 48 83 3d 7c 31 d8 01 cmpq $0x0,0x1d8317c(%rip) # 0x1d8319f 22: 00 23: 74 15 je 0x3a 25: 48 89 df mov %rbx,%rdi 28: 57 push %rdi 29: 9d popfq * 2a: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) <-- trapping instruction 2f: eb b2 jmp 0xffffffe3 31: e8 fb eb e6 f8 callq 0xf8e6ec31 36: eb c0 jmp 0xfffffff8 38: 0f 0b ud2 3a: 0f 0b ud2 3c: 48 rex.W 3d: c7 .byte 0xc7 3e: c7 (bad) 3f: 88 .byte 0x88