In the Linux kernel, the following vulnerability has been resolved:
net: USB: Fix wrong-direction WARNING in plusb.c
The syzbot fuzzer detected a bug in the plusb network driver: A
zero-length control-OUT transfer was treated as a read instead of a
write. In modern kernels this error provokes a WARNING:
usb 1-1: BOGUS control dir, pipe 80000280 doesn't match bRequestType c0
WARNING: CPU: 0 PID: 4645 at drivers/usb/core/urb.c:411usb_submit_urb+0x14a7/0x1880drivers/usb/core/urb.c:411Modules linked in:CPU: 1 PID: 4645 Comm: dhcpcd Not tainted
6.2.0-rc6-syzkaller-00050-g9f266ccaa2f5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google
01/12/2023
RIP: 0010:usb_submit_urb+0x14a7/0x1880drivers/usb/core/urb.c:411...
Call Trace:<TASK>usb_start_wait_urb+0x101/0x4b0drivers/usb/core/message.c:58usb_internal_control_msgdrivers/usb/core/message.c:102[inline]usb_control_msg+0x320/0x4a0drivers/usb/core/message.c:153__usbnet_read_cmd+0xb9/0x390drivers/net/usb/usbnet.c:2010usbnet_read_cmd+0x96/0xf0drivers/net/usb/usbnet.c:2068pl_vendor_reqdrivers/net/usb/plusb.c:60[inline]pl_set_QuickLink_featuresdrivers/net/usb/plusb.c:75[inline]pl_reset+0x2f/0xf0drivers/net/usb/plusb.c:85usbnet_open+0xcc/0x5d0drivers/net/usb/usbnet.c:889__dev_open+0x297/0x4d0net/core/dev.c:1417__dev_change_flags+0x587/0x750net/core/dev.c:8530dev_change_flags+0x97/0x170net/core/dev.c:8602devinet_ioctl+0x15a2/0x1d70net/ipv4/devinet.c:1147inet_ioctl+0x33f/0x380net/ipv4/af_inet.c:979sock_do_ioctl+0xcc/0x230net/socket.c:1169sock_ioctl+0x1f8/0x680net/socket.c:1286vfs_ioctlfs/ioctl.c:51[inline]__do_sys_ioctlfs/ioctl.c:870[inline]__se_sys_ioctlfs/ioctl.c:856[inline]__x64_sys_ioctl+0x197/0x210fs/ioctl.c:856do_syscall_x64arch/x86/entry/common.c:50[inline]do_syscall_64+0x39/0xb0arch/x86/entry/common.c:80entry_SYSCALL_64_after_hwframe+0x63/0xcd
The fix is to call usbnet_write_cmd() instead of usbnet_read_cmd() and
remove the USB_DIR_IN flag.