netlink: 'syz-executor4': attribute type 4 has an invalid length. vhci_hcd: invalid port number 0 vhci_hcd: invalid port number 108 ================================================================== netlink: 'syz-executor4': attribute type 4 has an invalid length. BUG: KASAN: use-after-free in vhci_hub_control+0x1b6d/0x1be0 drivers/usb/usbip/vhci_hcd.c:441 Read of size 4 at addr ffff8801ce1eb7bc by task syz-executor5/18325 CPU: 1 PID: 18325 Comm: syz-executor5 Not tainted 4.19.0-rc7+ #176 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_compat_ioctl+0x24/0x30 drivers/usb/core/devio.c:2580 __do_compat_sys_ioctl fs/compat_ioctl.c:1419 [inline] __se_compat_sys_ioctl fs/compat_ioctl.c:1365 [inline] __ia32_compat_sys_ioctl+0x20e/0x630 fs/compat_ioctl.c:1365 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f64ca9 Code: 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 0c 24 c3 8b 1c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f5f600cc EFLAGS: 00000296 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00000000c0185500 RDX: 0000000020000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 10676: 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 __build_skb+0xab/0x430 net/core/skbuff.c:281 netlink_alloc_large_skb net/netlink/af_netlink.c:1198 [inline] netlink_sendmsg+0x76b/0xfc0 net/netlink/af_netlink.c:1883 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:631 kernel_sendmsg+0x43/0x50 net/socket.c:639 sock_no_sendpage+0x1ce/0x290 net/core/sock.c:2639 kernel_sendpage+0x93/0xf0 net/socket.c:3327 sock_sendpage+0x8c/0xc0 net/socket.c:846 pipe_to_sendpage+0x2d0/0x400 fs/splice.c:452 splice_from_pipe_feed fs/splice.c:503 [inline] __splice_from_pipe+0x38b/0x7c0 fs/splice.c:627 splice_from_pipe+0x1ec/0x340 fs/splice.c:662 generic_splice_sendpage+0x3c/0x50 fs/splice.c:833 do_splice_from fs/splice.c:852 [inline] direct_splice_actor+0x128/0x190 fs/splice.c:1019 splice_direct_to_actor+0x318/0x8f0 fs/splice.c:974 do_splice_direct+0x2d4/0x420 fs/splice.c:1062 do_sendfile+0x62a/0xe20 fs/read_write.c:1440 __do_compat_sys_sendfile fs/read_write.c:1516 [inline] __se_compat_sys_sendfile fs/read_write.c:1505 [inline] __ia32_compat_sys_sendfile+0x190/0x2a0 fs/read_write.c:1505 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 10676: 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 kfree_skbmem+0x154/0x230 net/core/skbuff.c:582 __kfree_skb net/core/skbuff.c:642 [inline] consume_skb+0x1b6/0x570 net/core/skbuff.c:701 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x5ad/0x760 net/netlink/af_netlink.c:1343 netlink_sendmsg+0xa18/0xfc0 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:631 kernel_sendmsg+0x43/0x50 net/socket.c:639 sock_no_sendpage+0x1ce/0x290 net/core/sock.c:2639 kernel_sendpage+0x93/0xf0 net/socket.c:3327 sock_sendpage+0x8c/0xc0 net/socket.c:846 pipe_to_sendpage+0x2d0/0x400 fs/splice.c:452 splice_from_pipe_feed fs/splice.c:503 [inline] __splice_from_pipe+0x38b/0x7c0 fs/splice.c:627 splice_from_pipe+0x1ec/0x340 fs/splice.c:662 generic_splice_sendpage+0x3c/0x50 fs/splice.c:833 do_splice_from fs/splice.c:852 [inline] direct_splice_actor+0x128/0x190 fs/splice.c:1019 splice_direct_to_actor+0x318/0x8f0 fs/splice.c:974 do_splice_direct+0x2d4/0x420 fs/splice.c:1062 do_sendfile+0x62a/0xe20 fs/read_write.c:1440 __do_compat_sys_sendfile fs/read_write.c:1516 [inline] __se_compat_sys_sendfile fs/read_write.c:1505 [inline] __ia32_compat_sys_sendfile+0x190/0x2a0 fs/read_write.c:1505 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 The buggy address belongs to the object at ffff8801ce1eb700 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 188 bytes inside of 232-byte region [ffff8801ce1eb700, ffff8801ce1eb7e8) The buggy address belongs to the page: page:ffffea0007387ac0 count:1 mapcount:0 mapping:ffff8801d9a04040 index:0xffff8801ce1ebd40 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea00073243c8 ffffea0007380588 ffff8801d9a04040 raw: ffff8801ce1ebd40 ffff8801ce1eb0c0 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801ce1eb680: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ffff8801ce1eb700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801ce1eb780: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ^ ffff8801ce1eb800: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8801ce1eb880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================