vhci_hcd vhci_hcd.0: pdev(0) rhport(0) sockfd(6) vhci_hcd vhci_hcd.0: devid(0) speed(3) speed_str(high-speed) netlink: 40 bytes leftover after parsing attributes in process `syz-executor.0'. ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:376 [inline] BUG: KASAN: slab-out-of-bounds in usb_hcd_poll_rh_status+0x326/0x630 drivers/usb/core/hcd.c:782 Write of size 2 at addr ffff8880b358fd00 by task syz-executor.0/16443 CPU: 1 PID: 16443 Comm: syz-executor.0 Not tainted 4.14.228-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report+0x6f/0x80 mm/kasan/report.c:409 memcpy+0x35/0x50 mm/kasan/kasan.c:303 memcpy include/linux/string.h:376 [inline] usb_hcd_poll_rh_status+0x326/0x630 drivers/usb/core/hcd.c:782 store_attach+0x586/0x990 drivers/usb/usbip/vhci_sysfs.c:437 dev_attr_store+0x56/0x80 drivers/base/core.c:738 sysfs_kf_write+0x106/0x160 fs/sysfs/file.c:142 kernfs_fop_write+0x289/0x440 fs/kernfs/file.c:316 __vfs_write+0xe4/0x630 fs/read_write.c:480 vfs_write+0x17f/0x4d0 fs/read_write.c:544 SYSC_write fs/read_write.c:590 [inline] SyS_write+0xf2/0x210 fs/read_write.c:582 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x41913f RSP: 002b:00007f093d2a2b90 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000007 RCX: 000000000041913f RDX: 0000000000000007 RSI: 00007f093d2a2be0 RDI: 0000000000000008 RBP: 0000000000000008 R08: 0000000000000000 R09: 00007f093d2a2b30 R10: 0000000000000000 R11: 0000000000000293 R12: 00000000004afb38 R13: 00007f093d2a2be0 R14: 0000000000000000 R15: 0000000000022000 Allocated by task 16114: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15a/0x400 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] proc_do_submiturb+0x280f/0x3610 drivers/usb/core/devio.c:1684 proc_submiturb drivers/usb/core/devio.c:1841 [inline] usbdev_do_ioctl+0x665/0x2b70 drivers/usb/core/devio.c:2495 usbdev_ioctl+0x21/0x30 drivers/usb/core/devio.c:2599 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 7995: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 kvfree+0x45/0x50 mm/util.c:416 __vunmap+0x20f/0x300 mm/vmalloc.c:1548 vfree+0x4b/0xd0 mm/vmalloc.c:1612 copy_entries_to_user net/ipv4/netfilter/ip_tables.c:867 [inline] get_entries net/ipv4/netfilter/ip_tables.c:1025 [inline] do_ipt_get_ctl+0x5c7/0x7a0 net/ipv4/netfilter/ip_tables.c:1702 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x62/0xc0 net/netfilter/nf_sockopt.c:122 ip_getsockopt net/ipv4/ip_sockglue.c:1566 [inline] ip_getsockopt+0x105/0x150 net/ipv4/ip_sockglue.c:1551 tcp_getsockopt+0x7b/0xc0 net/ipv4/tcp.c:3257 SYSC_getsockopt net/socket.c:1896 [inline] SyS_getsockopt+0x102/0x1c0 net/socket.c:1878 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8880b358fd00 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8880b358fd00, ffff8880b358fd20) The buggy address belongs to the page: page:ffffea0002cd63c0 count:1 mapcount:0 mapping:ffff8880b358f000 index:0xffff8880b358ffc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880b358f000 ffff8880b358ffc1 0000000100000029 raw: ffffea0002c11a20 ffffea0002ce2460 ffff88813fe801c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b358fc00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880b358fc80: fb fb fb fb fc fc fc fc 00 04 fc fc fc fc fc fc >ffff8880b358fd00: 01 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff8880b358fd80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880b358fe00: 00 01 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================