vhci_hcd: invalid port number 0 vhci_hcd: invalid port number 76 vhci_hcd: invalid port number 76 ================================================================== BUG: KASAN: slab-out-of-bounds in vhci_hub_control+0x1b6d/0x1be0 drivers/usb/usbip/vhci_hcd.c:441 Read of size 4 at addr ffff8801ce0c44bc by task syz-executor2/18404 CPU: 0 PID: 18404 Comm: syz-executor2 Not tainted 4.19.0-rc8+ #288 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+0x1c4/0x2b4 lib/dump_stack.c:113 print_address_description.cold.8+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432 vhci_hub_control+0x1b6d/0x1be0 drivers/usb/usbip/vhci_hcd.c:441 rh_call_control drivers/usb/core/hcd.c:679 [inline] rh_urb_enqueue drivers/usb/core/hcd.c:838 [inline] usb_hcd_submit_urb+0x17bb/0x20a0 drivers/usb/core/hcd.c:1651 usb_submit_urb+0x893/0x14e0 drivers/usb/core/urb.c:570 usb_start_wait_urb+0x13d/0x370 drivers/usb/core/message.c:57 usb_internal_control_msg drivers/usb/core/message.c:101 [inline] usb_control_msg+0x332/0x4e0 drivers/usb/core/message.c:152 proc_control+0x99b/0xef0 drivers/usb/core/devio.c:1106 usbdev_do_ioctl+0x1eb8/0x3b50 drivers/usb/core/devio.c:2412 usbdev_ioctl+0x25/0x30 drivers/usb/core/devio.c:2569 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0x1de/0x1720 fs/ioctl.c:685 ksys_ioctl+0xa9/0xd0 fs/ioctl.c:702 __do_sys_ioctl fs/ioctl.c:709 [inline] __se_sys_ioctl fs/ioctl.c:707 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:707 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457569 Code: fd b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 cb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f9517e60c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457569 RDX: 0000000020000000 RSI: 00000000c0185500 RDI: 0000000000000003 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f9517e616d4 R13: 00000000004bf6ac R14: 00000000004cf598 R15: 00000000ffffffff Allocated by task 6651: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc+0x12e/0x730 mm/slab.c:3554 ptlock_alloc+0x20/0x80 mm/memory.c:4773 ptlock_init include/linux/mm.h:1869 [inline] pgtable_page_ctor include/linux/mm.h:1903 [inline] pte_alloc_one+0x6b/0x1a0 arch/x86/mm/pgtable.c:38 do_fault_around mm/memory.c:3606 [inline] do_read_fault mm/memory.c:3647 [inline] do_fault mm/memory.c:3752 [inline] handle_pte_fault mm/memory.c:3983 [inline] __handle_mm_fault+0x43f4/0x53e0 mm/memory.c:4107 handle_mm_fault+0x54f/0xc70 mm/memory.c:4144 __do_page_fault+0x67d/0xed0 arch/x86/mm/fault.c:1395 do_page_fault+0xf2/0x7e0 arch/x86/mm/fault.c:1470 page_fault+0x1e/0x30 arch/x86/entry/entry_64.S:1161 Freed by task 6651: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kmem_cache_free+0x83/0x290 mm/slab.c:3756 ptlock_free+0x38/0x42 mm/memory.c:4782 pte_lock_deinit include/linux/mm.h:1879 [inline] pgtable_page_dtor include/linux/mm.h:1912 [inline] ___pte_free_tlb+0x45/0x190 arch/x86/mm/pgtable.c:64 __pte_free_tlb arch/x86/include/asm/pgalloc.h:73 [inline] free_pte_range mm/memory.c:445 [inline] free_pmd_range mm/memory.c:463 [inline] free_pud_range mm/memory.c:497 [inline] free_p4d_range mm/memory.c:531 [inline] free_pgd_range+0x980/0xe00 mm/memory.c:611 free_pgtables+0x2c3/0x380 mm/memory.c:643 exit_mmap+0x2cd/0x590 mm/mmap.c:3094 __mmput kernel/fork.c:1001 [inline] mmput+0x247/0x610 kernel/fork.c:1022 exec_mmap fs/exec.c:1043 [inline] flush_old_exec+0xb91/0x21b0 fs/exec.c:1276 load_elf_binary+0xa39/0x5620 fs/binfmt_elf.c:869 search_binary_handler+0x17d/0x570 fs/exec.c:1653 exec_binprm fs/exec.c:1695 [inline] __do_execve_file.isra.33+0x162f/0x2540 fs/exec.c:1819 do_execveat_common fs/exec.c:1866 [inline] do_execve fs/exec.c:1883 [inline] __do_sys_execve fs/exec.c:1964 [inline] __se_sys_execve fs/exec.c:1959 [inline] __x64_sys_execve+0x8f/0xc0 fs/exec.c:1959 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8801ce0c4478 which belongs to the cache page->ptl of size 56 The buggy address is located 12 bytes to the right of 56-byte region [ffff8801ce0c4478, ffff8801ce0c44b0) The buggy address belongs to the page: page:ffffea0007383100 count:1 mapcount:0 mapping:ffff8801da810040 index:0xffff8801ce0c4898 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea0007381588 ffffea0006ff5048 ffff8801da810040 raw: ffff8801ce0c4898 ffff8801ce0c4000 0000000100000018 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801ce0c4380: fb fb fb fb fb fc fc fc fc fb fb fb fb fb fb fb ffff8801ce0c4400: fc fc fc fc fb fb fb fb fb fb fb fc fc fc fc fb >ffff8801ce0c4480: fb fb fb fb fb fb fc fc fc fc fb fb fb fb fb fb ^ ffff8801ce0c4500: fb fc fc fc fc fb fb fb fb fb fb fb fc fc fc fc ffff8801ce0c4580: fb fb fb fb fb fb fb fc fc fc fc fb fb fb fb fb ==================================================================