usb usb9: usbfs: process 29908 (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 ffff888041469200 by task syz-executor.5/29865 CPU: 1 PID: 29865 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_acquire+0x1ec/0x3c0 kernel/locking/lockdep.c:3911 Code: 08 00 00 00 00 00 00 48 c1 e8 03 80 3c 10 00 0f 85 b7 01 00 00 48 83 3d 09 2e a6 08 00 0f 84 2a 01 00 00 48 8b 7c 24 08 57 9d <0f> 1f 44 00 00 48 83 c4 18 5b 5d 41 5c 41 5d 41 5e 41 5f c3 65 8b RSP: 0018:ffff88801f1c7240 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff13e3051 RBX: ffff8880b4f1c080 RCX: 0000000000000344 RDX: dffffc0000000000 RSI: 000000004e387d7a RDI: 0000000000000286 RBP: ffffffff89ff4d00 R08: ffffffff8cd18f60 R09: 0000000000000001 R10: ffff8880b4f1c930 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001 __fs_reclaim_acquire mm/page_alloc.c:3759 [inline] fs_reclaim_acquire+0x105/0x130 mm/page_alloc.c:3770 prepare_alloc_pages mm/page_alloc.c:4341 [inline] __alloc_pages_nodemask+0x1b7/0x2890 mm/page_alloc.c:4393 alloc_pages_vma+0xf2/0x780 mm/mempolicy.c:2161 shmem_alloc_page+0x11c/0x1f0 mm/shmem.c:1494 shmem_alloc_and_acct_page+0x15a/0x850 mm/shmem.c:1519 shmem_getpage_gfp+0x4e9/0x37f0 mm/shmem.c:1797 IPVS: ftp: loaded support on port[0] = 21 shmem_fault+0x206/0x6b0 mm/shmem.c:2032 __do_fault+0x10b/0x4b0 mm/memory.c:3403 do_read_fault mm/memory.c:3815 [inline] do_fault mm/memory.c:3944 [inline] handle_pte_fault mm/memory.c:4175 [inline] __handle_mm_fault+0x273b/0x41c0 mm/memory.c:4299 handle_mm_fault+0x436/0xb10 mm/memory.c:4336 faultin_page mm/gup.c:539 [inline] __get_user_pages+0x6f0/0x1710 mm/gup.c:745 populate_vma_page_range+0x200/0x290 mm/gup.c:1249 __mm_populate+0x1ea/0x350 mm/gup.c:1297 mm_populate include/linux/mm.h:2338 [inline] vm_mmap_pgoff+0x1e2/0x200 mm/util.c:362 ksys_mmap_pgoff+0x45f/0x5a0 mm/mmap.c:1580 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f1758552ae9 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:00007f1755aa7188 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007f1758666020 RCX: 00007f1758552ae9 RDX: 0000000000000002 RSI: 0000000000b36000 RDI: 0000000020000000 RBP: 00007f17585acf6d R08: ffffffffffffffff R09: 0000000000000000 R10: 0000000000008031 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe76c2d46f R14: 00007f1755aa7300 R15: 0000000000022000 Allocated by task 29908: __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 27171: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 ops_free+0x1bd/0x310 net/core/net_namespace.c:143 ops_free_list net/core/net_namespace.c:165 [inline] ops_free_list net/core/net_namespace.c:159 [inline] setup_net+0x4a2/0x720 net/core/net_namespace.c:337 copy_net_ns+0x1f7/0x340 net/core/net_namespace.c:439 create_new_namespaces+0x3f6/0x7b0 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xbd/0x1f0 kernel/nsproxy.c:206 ksys_unshare+0x36c/0x9a0 kernel/fork.c:2542 __do_sys_unshare kernel/fork.c:2610 [inline] __se_sys_unshare kernel/fork.c:2608 [inline] __x64_sys_unshare+0x2d/0x40 kernel/fork.c:2608 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 ffff888041469200 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff888041469200, ffff888041469220) The buggy address belongs to the page: page:ffffea0001051a40 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff888041469fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea0002695b48 ffffea00017b9bc8 ffff88813bff01c0 raw: ffff888041469fc1 ffff888041469000 0000000100000038 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888041469100: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff888041469180: 00 00 00 00 fc fc fc fc 00 00 fc fc fc fc fc fc >ffff888041469200: 01 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff888041469280: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff888041469300: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 08 00 or %al,(%rax) 2: 00 00 add %al,(%rax) 4: 00 00 add %al,(%rax) 6: 00 48 c1 add %cl,-0x3f(%rax) 9: e8 03 80 3c 10 callq 0x103c8011 e: 00 0f add %cl,(%rdi) 10: 85 b7 01 00 00 48 test %esi,0x48000001(%rdi) 16: 83 3d 09 2e a6 08 00 cmpl $0x0,0x8a62e09(%rip) # 0x8a62e26 1d: 0f 84 2a 01 00 00 je 0x14d 23: 48 8b 7c 24 08 mov 0x8(%rsp),%rdi 28: 57 push %rdi 29: 9d popfq * 2a: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) <-- trapping instruction 2f: 48 83 c4 18 add $0x18,%rsp 33: 5b pop %rbx 34: 5d pop %rbp 35: 41 5c pop %r12 37: 41 5d pop %r13 39: 41 5e pop %r14 3b: 41 5f pop %r15 3d: c3 retq 3e: 65 gs 3f: 8b .byte 0x8b