vhci_hcd: invalid port number 108 ================================================================== 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 ffff8801ce1037bc by task syz-executor0/23791 CPU: 1 PID: 23791 Comm: syz-executor0 Not tainted 4.19.0-rc7+ #283 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:00007f9edebf5c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457569 RDX: 0000000020000100 RSI: 00000000c0185500 RDI: 0000000000000003 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f9edebf66d4 R13: 00000000004bf6ac R14: 00000000004cf598 R15: 00000000ffffffff Allocated by task 23029: 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 kobject: 'loop2' (000000004ee9962e): kobject_uevent_env __do_kmalloc mm/slab.c:3718 [inline] __kmalloc_track_caller+0x14a/0x750 mm/slab.c:3733 kmemdup+0x24/0x50 mm/util.c:118 kobject: 'loop2' (000000004ee9962e): fill_kobj_path: path = '/devices/virtual/block/loop2' kmemdup include/linux/string.h:418 [inline] __devinet_sysctl_register+0xa5/0x2b0 net/ipv4/devinet.c:2323 devinet_sysctl_register+0x163/0x220 net/ipv4/devinet.c:2375 inetdev_init+0x2df/0x590 net/ipv4/devinet.c:264 inetdev_event+0xf47/0x1380 net/ipv4/devinet.c:1468 notifier_call_chain+0x17e/0x380 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1733 call_netdevice_notifiers net/core/dev.c:1751 [inline] register_netdevice+0xb98/0x10f0 net/core/dev.c:8532 ppp_unit_register drivers/net/ppp/ppp_generic.c:993 [inline] ppp_dev_configure+0xa94/0xe80 drivers/net/ppp/ppp_generic.c:1049 ppp_create_interface drivers/net/ppp/ppp_generic.c:3013 [inline] ppp_unattached_ioctl drivers/net/ppp/ppp_generic.c:848 [inline] ppp_ioctl+0x1a2a/0x2f59 drivers/net/ppp/ppp_generic.c:601 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 Freed by task 23027: 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 __devinet_sysctl_unregister.isra.27+0x6d/0xb0 net/ipv4/devinet.c:2359 devinet_sysctl_unregister+0x92/0xf0 net/ipv4/devinet.c:2386 inetdev_destroy net/ipv4/devinet.c:311 [inline] inetdev_event+0xa8f/0x1380 net/ipv4/devinet.c:1536 notifier_call_chain+0x17e/0x380 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1733 call_netdevice_notifiers net/core/dev.c:1751 [inline] rollback_registered_many+0xb7a/0x1210 net/core/dev.c:7976 rollback_registered+0x1e9/0x420 net/core/dev.c:8018 unregister_netdevice_queue+0x321/0x5e0 net/core/dev.c:9062 unregister_netdevice include/linux/netdevice.h:2599 [inline] ppp_release+0x1c9/0x1f0 drivers/net/ppp/ppp_generic.c:409 __fput+0x385/0xa30 fs/file_table.c:278 ____fput+0x15/0x20 fs/file_table.c:309 task_work_run+0x1e8/0x2a0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293 kobject: 'queues' (00000000c2678b43): kset_release entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8801ce1020c0 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 1788 bytes to the right of 4096-byte region [ffff8801ce1020c0, ffff8801ce1030c0) The buggy address belongs to the page: page:ffffea0007384080 count:1 mapcount:0 mapping:ffff8801da800dc0 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffffea0006f42008 ffffea00060c1708 ffff8801da800dc0 raw: 0000000000000000 ffff8801ce1020c0 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801ce103680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc kobject: 'queues': free name ffff8801ce103700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801ce103780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801ce103800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801ce103880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================