usb usb9: usbfs: process 26854 (syz-executor.3) did not claim interface 0 before use usb usb9: usbfs: interface 0 claimed by usbfs while 'syz-executor.3' sets config #2 ================================================================== 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 ffff8880b5b335c0 by task syz-executor.3/26854 CPU: 1 PID: 26854 Comm: syz-executor.3 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:console_unlock+0xe7b/0x1110 kernel/printk/printk.c:2468 Code: ff df 48 c1 e8 03 80 3c 08 00 0f 85 66 02 00 00 48 83 3d cf c3 a3 08 00 0f 84 9e 00 00 00 e8 ac c6 14 00 48 8b 7c 24 30 57 9d <0f> 1f 44 00 00 e9 9b fc ff ff e8 96 c6 14 00 0f 0b e8 8f c6 14 00 RSP: 0018:ffff888047abf6e0 EFLAGS: 00000216 ORIG_RAX: ffffffffffffff13 RAX: 0000000000040000 RBX: 0000000000000200 RCX: ffffc90006d5e000 RDX: 0000000000015114 RSI: ffffffff814dbec4 RDI: 0000000000000216 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff8446efa0 R13: 0000000000000063 R14: 0000000000000000 R15: ffffffff8a6dd090 vprintk_emit+0x2d1/0x740 kernel/printk/printk.c:1965 dev_vprintk_emit+0x2e3/0x640 drivers/base/core.c:3264 dev_printk_emit+0xbb/0xf0 drivers/base/core.c:3275 __dev_printk+0x108/0x260 drivers/base/core.c:3287 _dev_warn+0xd8/0x110 drivers/base/core.c:3331 proc_setconfig drivers/usb/core/devio.c:1393 [inline] usbdev_do_ioctl+0x21ac/0x3030 drivers/usb/core/devio.c:2476 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 RIP: 0033:0x7f3f0afb4ae9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007f3f0852a188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f3f0b0c7f60 RCX: 00007f3f0afb4ae9 RDX: 0000000020000000 RSI: 0000000080045505 RDI: 0000000000000004 RBP: 00007f3f0b00ef25 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc1fec4b0f R14: 00007f3f0852a300 R15: 0000000000022000 Allocated by task 26854: __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 25986: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 check_cfg+0x313/0x11e0 kernel/bpf/verifier.c:4778 bpf_check+0xcbd/0x9cc0 kernel/bpf/verifier.c:6504 bpf_prog_load+0xcce/0x1230 kernel/bpf/syscall.c:1450 __do_sys_bpf kernel/bpf/syscall.c:2423 [inline] __se_sys_bpf+0xf22/0x3a20 kernel/bpf/syscall.c:2384 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 ffff8880b5b335c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880b5b335c0, ffff8880b5b335e0) The buggy address belongs to the page: page:ffffea0002d6ccc0 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff8880b5b33fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002a5bb08 ffffea0002a5da48 ffff88813bff01c0 raw: ffff8880b5b33fc1 ffff8880b5b33000 000000010000003b 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b5b33480: 00 01 fc fc fc fc fc fc 00 01 fc fc fc fc fc fc ffff8880b5b33500: fb fb fb fb fc fc fc fc 00 01 fc fc fc fc fc fc >ffff8880b5b33580: 00 01 fc fc fc fc fc fc 01 fc fc fc fc fc fc fc ^ ffff8880b5b33600: 00 01 fc fc fc fc fc fc 00 01 fc fc fc fc fc fc ffff8880b5b33680: 00 01 fc fc fc fc fc fc 00 01 fc fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess), 1 bytes skipped: 0: df 48 c1 fisttps -0x3f(%rax) 3: e8 03 80 3c 08 callq 0x83c800b 8: 00 0f add %cl,(%rdi) a: 85 66 02 test %esp,0x2(%rsi) d: 00 00 add %al,(%rax) f: 48 83 3d cf c3 a3 08 cmpq $0x0,0x8a3c3cf(%rip) # 0x8a3c3e6 16: 00 17: 0f 84 9e 00 00 00 je 0xbb 1d: e8 ac c6 14 00 callq 0x14c6ce 22: 48 8b 7c 24 30 mov 0x30(%rsp),%rdi 27: 57 push %rdi 28: 9d popfq * 29: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) <-- trapping instruction 2e: e9 9b fc ff ff jmpq 0xfffffcce 33: e8 96 c6 14 00 callq 0x14c6ce 38: 0f 0b ud2 3a: e8 8f c6 14 00 callq 0x14c6ce