usb usb9: usbfs: process 17369 (syz-executor.2) 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 ffff8880a99eb240 by task syz-executor.3/17335 CPU: 1 PID: 17335 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:ext4_es_free_extent+0x0/0x590 fs/ext4/extents_status.c:357 Code: 48 c7 c7 88 16 0f 8b e8 be 00 bd ff e9 00 fe ff ff 48 89 ef e8 b1 00 bd ff e9 30 fe ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 90 <41> 57 41 56 41 55 49 89 f5 41 54 55 53 48 89 fb 48 83 ec 20 e8 97 RSP: 0018:ffff888090d5ed10 EFLAGS: 00000292 ORIG_RAX: ffffffffffffff13 RAX: ffff88804b7be8c0 RBX: ffff8880536bde70 RCX: ffff8880536bde70 RDX: 1ffff1100a6d7bce RSI: ffff88804b7be8c0 RDI: ffff88804b74d530 RBP: ffff88804b7be8c0 R08: 0000000000000001 R09: 000000000000000f R10: 0000000000000004 R11: 0000000000000000 R12: 000000000000000f R13: 0000000000000001 R14: 000000000000000f R15: 0000000000000000 __es_remove_extent+0x4fa/0x700 fs/ext4/extents_status.c:915 ext4_es_insert_extent+0x18c/0x5e0 fs/ext4/extents_status.c:722 ext4_map_blocks+0xa2a/0x1a50 fs/ext4/inode.c:728 mpage_map_one_extent fs/ext4/inode.c:2477 [inline] mpage_map_and_submit_extent fs/ext4/inode.c:2530 [inline] ext4_writepages+0x1d1d/0x37f0 fs/ext4/inode.c:2882 do_writepages+0xe5/0x290 mm/page-writeback.c:2344 __filemap_fdatawrite_range+0x27d/0x350 mm/filemap.c:446 file_write_and_wait_range+0x93/0x100 mm/filemap.c:776 __generic_file_fsync+0x74/0x1f0 fs/libfs.c:985 ext4_sync_file+0xa35/0x1420 fs/ext4/fsync.c:118 vfs_fsync_range+0x13a/0x220 fs/sync.c:197 generic_write_sync include/linux/fs.h:2750 [inline] ext4_file_write_iter+0x726/0xf20 fs/ext4/file.c:283 call_write_iter include/linux/fs.h:1821 [inline] do_iter_readv_writev+0x668/0x790 fs/read_write.c:681 do_iter_write+0x182/0x5d0 fs/read_write.c:960 vfs_iter_write+0x70/0xa0 fs/read_write.c:973 iter_file_splice_write+0x60d/0xbb0 fs/splice.c:750 do_splice_from fs/splice.c:852 [inline] direct_splice_actor+0x115/0x160 fs/splice.c:1025 splice_direct_to_actor+0x33f/0x8d0 fs/splice.c:980 do_splice_direct+0x1a7/0x270 fs/splice.c:1068 do_sendfile+0x550/0xc30 fs/read_write.c:1447 __do_sys_sendfile64 fs/read_write.c:1502 [inline] __se_sys_sendfile64+0xc4/0x160 fs/read_write.c:1494 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f4ddc8deae9 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:00007f4dd9e54188 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00007f4ddc9f1f60 RCX: 00007f4ddc8deae9 RDX: 00000000200001c0 RSI: 0000000000000006 RDI: 0000000000000006 RBP: 00007f4ddc938f25 R08: 0000000000000000 R09: 0000000000000000 R10: 00008080ffffff80 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff1f4ff85f R14: 00007f4dd9e54300 R15: 0000000000022000 Allocated by task 17369: __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 16384: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 single_release+0x8c/0xb0 fs/seq_file.c:600 full_proxy_release+0x10e/0x2c0 fs/debugfs/file.c:239 __fput+0x2ce/0x890 fs/file_table.c:278 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 The buggy address belongs to the object at ffff8880a99eb240 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880a99eb240, ffff8880a99eb260) The buggy address belongs to the page: page:ffffea0002a67ac0 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff8880a99ebfc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002c58548 ffffea00029288c8 ffff88813bff01c0 raw: ffff8880a99ebfc1 ffff8880a99eb000 000000010000003e 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a99eb100: 00 04 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff8880a99eb180: fb fb fb fb fc fc fc fc 05 fc fc fc fc fc fc fc >ffff8880a99eb200: fb fb fb fb fc fc fc fc 01 fc fc fc fc fc fc fc ^ ffff8880a99eb280: fb fb fb fb fc fc fc fc 00 06 fc fc fc fc fc fc ffff8880a99eb300: 00 04 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 48 c7 c7 88 16 0f 8b mov $0xffffffff8b0f1688,%rdi 7: e8 be 00 bd ff callq 0xffbd00ca c: e9 00 fe ff ff jmpq 0xfffffe11 11: 48 89 ef mov %rbp,%rdi 14: e8 b1 00 bd ff callq 0xffbd00ca 19: e9 30 fe ff ff jmpq 0xfffffe4e 1e: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) 25: 00 00 00 00 29: 90 nop * 2a: 41 57 push %r15 <-- trapping instruction 2c: 41 56 push %r14 2e: 41 55 push %r13 30: 49 89 f5 mov %rsi,%r13 33: 41 54 push %r12 35: 55 push %rbp 36: 53 push %rbx 37: 48 89 fb mov %rdi,%rbx 3a: 48 83 ec 20 sub $0x20,%rsp 3e: e8 .byte 0xe8 3f: 97 xchg %eax,%edi