audit: type=1804 audit(1636302369.010:199): pid=23430 uid=0 auid=4294967295 ses=4294967295 subj==unconfined op=invalid_pcr cause=open_writers comm="syz-executor.2" name="/root/syzkaller-testdir144932152/syzkaller.z9rT8e/148/file0" dev="sda1" ino=14693 res=1 input: syz1 as /devices/virtual/input/input228 vhci_hcd vhci_hcd.0: pdev(0) rhport(0) sockfd(3) vhci_hcd vhci_hcd.0: devid(0) speed(1) speed_str(low-speed) ================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/string.h:377 [inline] BUG: KASAN: slab-out-of-bounds in usb_hcd_poll_rh_status+0x387/0x6f0 drivers/usb/core/hcd.c:771 Write of size 2 at addr ffff888098fb9a80 by task syz-executor.0/23488 CPU: 1 PID: 23488 Comm: syz-executor.0 Not tainted 4.19.211-syzkaller #0 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+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report+0x8f/0xa0 mm/kasan/report.c:412 memcpy+0x35/0x50 mm/kasan/kasan.c:303 memcpy include/linux/string.h:377 [inline] usb_hcd_poll_rh_status+0x387/0x6f0 drivers/usb/core/hcd.c:771 attach_store+0x76e/0xb30 drivers/usb/usbip/vhci_sysfs.c:435 dev_attr_store+0x56/0x80 drivers/base/core.c:966 sysfs_kf_write+0x110/0x160 fs/sysfs/file.c:140 kernfs_fop_write+0x2b0/0x470 fs/kernfs/file.c:316 __vfs_write+0xf7/0x770 fs/read_write.c:485 vfs_write+0x1f3/0x540 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f8adfb595ff Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 99 fd ff ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 cc fd ff ff 48 RSP: 002b:00007f8add11bb90 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000007 RCX: 00007f8adfb595ff RDX: 0000000000000007 RSI: 00007f8add11bbe0 RDI: 0000000000000005 RBP: 0000000000000005 R08: 0000000000000000 R09: 00007f8add11bb30 R10: 0000000000000000 R11: 0000000000000293 R12: 00007f8adfbf0948 R13: 00007f8add11bbe0 R14: 0000000000000000 R15: 0000000000022000 Allocated by task 17006: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15a/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] proc_do_submiturb+0x2d17/0x3b00 drivers/usb/core/devio.c:1673 proc_submiturb drivers/usb/core/devio.c:1827 [inline] usbdev_do_ioctl+0x773/0x3030 drivers/usb/core/devio.c:2481 usbdev_ioctl+0x21/0x30 drivers/usb/core/devio.c:2585 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:501 [inline] do_vfs_ioctl+0xcdb/0x12e0 fs/ioctl.c:688 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:705 __do_sys_ioctl fs/ioctl.c:712 [inline] __se_sys_ioctl fs/ioctl.c:710 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:710 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8153: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 security_sk_free+0x3e/0x70 security/security.c:1474 sk_prot_free net/core/sock.c:1516 [inline] __sk_destruct+0x51d/0x8a0 net/core/sock.c:1602 sk_destruct net/core/sock.c:1617 [inline] __sk_free+0x165/0x3b0 net/core/sock.c:1628 sk_free+0x3b/0x50 net/core/sock.c:1639 sock_put include/net/sock.h:1713 [inline] tcp_close+0xb23/0xfd0 net/ipv4/tcp.c:2506 inet_release+0xd7/0x1e0 net/ipv4/af_inet.c:427 inet6_release+0x4c/0x70 net/ipv6/af_inet6.c:472 __sock_release+0xcd/0x2a0 net/socket.c:599 sock_close+0x15/0x20 net/socket.c:1214 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff888098fb9a80 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff888098fb9a80, ffff888098fb9aa0) The buggy address belongs to the page: IPVS: ftp: loaded support on port[0] = 21 page:ffffea000263ee40 count:1 mapcount:0 mapping:ffff88813bff01c0 index:0xffff888098fb9fc1 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea00028d7488 ffffea0002955288 ffff88813bff01c0 raw: ffff888098fb9fc1 ffff888098fb9000 0000000100000032 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888098fb9980: 00 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff888098fb9a00: 05 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc >ffff888098fb9a80: 01 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff888098fb9b00: fb fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc ffff888098fb9b80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================