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 vhci_hcd: invalid port number 76 Read of size 4 at addr ffff8801cdf9c3bc by task syz-executor2/10323 CPU: 1 PID: 10323 Comm: syz-executor2 Not tainted 4.19.0-rc8+ #70 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:00007fa3bce21c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457569 RDX: 0000000020000140 RSI: 00000000c0185500 RDI: 0000000000000003 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fa3bce226d4 R13: 00000000004bf6ac R14: 00000000004cf598 R15: 00000000ffffffff Allocated by task 9326: 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 kmem_cache_alloc_trace+0x152/0x750 mm/slab.c:3620 kmalloc include/linux/slab.h:513 [inline] kzalloc include/linux/slab.h:707 [inline] selinux_key_alloc+0x4e/0x1a0 security/selinux/hooks.c:6630 security_key_alloc+0x60/0xc0 security/security.c:1723 key_alloc+0x80f/0x10d0 security/keys/key.c:313 keyring_alloc+0x4d/0xc0 security/keys/keyring.c:503 install_process_keyring_to_cred.part.2+0x87/0x100 security/keys/process_keys.c:192 install_process_keyring_to_cred include/linux/cred.h:188 [inline] install_process_keyring security/keys/process_keys.c:217 [inline] lookup_user_key+0xdd4/0x1490 security/keys/process_keys.c:574 __do_sys_add_key security/keys/keyctl.c:114 [inline] __se_sys_add_key security/keys/keyctl.c:62 [inline] __x64_sys_add_key+0x276/0x4f0 security/keys/keyctl.c:62 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 5642: 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] kfree+0xcf/0x230 mm/slab.c:3813 selinux_key_free+0x42/0x50 security/selinux/hooks.c:6649 security_key_free+0x4a/0x80 security/security.c:1728 key_gc_unused_keys.constprop.1+0xfa/0x6d0 security/keys/gc.c:143 key_garbage_collector+0x53f/0xb60 security/keys/gc.c:297 process_one_work+0xc90/0x1b90 kernel/workqueue.c:2153 worker_thread+0x17f/0x1390 kernel/workqueue.c:2296 kthread+0x35a/0x420 kernel/kthread.c:246 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:413 The buggy address belongs to the object at ffff8801cdf9c380 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 28 bytes to the right of 32-byte region [ffff8801cdf9c380, ffff8801cdf9c3a0) The buggy address belongs to the page: page:ffffea000737e700 count:1 mapcount:0 mapping:ffff8801da8001c0 index:0xffff8801cdf9cfc1 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea0007352148 ffffea00073b3748 ffff8801da8001c0 raw: ffff8801cdf9cfc1 ffff8801cdf9c000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cdf9c280: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8801cdf9c300: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff8801cdf9c380: fb fb fb fb fc fc fc fc 00 00 01 fc fc fc fc fc ^ ffff8801cdf9c400: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8801cdf9c480: 00 00 01 fc fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================