linux/drivers/usb
Azeem Shaikh ee400a1be1 usb: gadget: function: printer: Replace strlcpy with strscpy
strlcpy() reads the entire source buffer first.
This read may exceed the destination size limit.
This is both inefficient and can lead to linear read
overflows if a source string is not NUL-terminated [1].
In an effort to remove strlcpy() completely [2], replace
strlcpy() here with strscpy().

Direct replacement is safe here since return value of -errno
is used to check for truncation instead of PAGE_SIZE.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89

Signed-off-by: Azeem Shaikh <azeemshaikh38@gmail.com>
Link: https://lore.kernel.org/r/20230615180318.400639-1-azeemshaikh38@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-19 15:34:40 +02:00
..
atm
c67x00 usb: c67x00-drv: Convert to platform remove callback returning void 2023-05-28 12:36:14 +01:00
cdns3 Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection" 2023-06-15 11:30:35 +02:00
chipidea usb: chipidea: imx: add missing USB PHY DPDM wakeup setting 2023-06-13 12:05:42 +02:00
class USB: usbtmc: Fix direction for 0-length ioctl control messages 2023-05-13 17:25:49 +09:00
common Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection" 2023-06-15 11:30:35 +02:00
core usb: update the ctime as well when updating mtime after an ioctl 2023-06-13 11:58:50 +02:00
dwc2 usb: dwc2/platform: Convert to platform remove callback returning void 2023-05-30 15:27:17 +01:00
dwc3 usb: dwc3-meson-g12a: Fix an error handling path in dwc3_meson_g12a_probe() 2023-06-13 11:59:01 +02:00
early
fotg210 usb: fotg210: Convert to platform remove callback returning void 2023-05-28 12:36:25 +01:00
gadget usb: gadget: function: printer: Replace strlcpy with strscpy 2023-06-19 15:34:40 +02:00
host xhci: Add ZHAOXIN xHCI host U1/U2 feature support 2023-06-13 11:34:50 +02:00
image scsi: usb: uas: Declare two host templates and host template pointers const 2023-03-24 19:20:00 -04:00
isp1760 usb: isp1760: Convert to platform remove callback returning void 2023-05-28 12:38:01 +01:00
misc usb: usb251xb: Use of_property_read_u16() 2023-06-13 11:55:18 +02:00
mon driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
mtu3 usb: mtu3: add optional clock xhci_ck and frmcnt_ck 2023-04-20 11:17:05 +02:00
musb Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection" 2023-06-15 11:30:35 +02:00
phy usb: Switch i2c drivers back to use .probe() 2023-05-29 15:53:11 +01:00
renesas_usbhs usb: renesas_usbhs: Convert to platform remove callback returning void 2023-05-28 12:38:01 +01:00
roles Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection" 2023-06-15 11:30:35 +02:00
serial Driver core changes for 6.4-rc1 2023-04-27 11:53:57 -07:00
storage usb-storage: fix deadlock when a scsi command timeouts more than once 2023-05-13 18:53:03 +09:00
typec usb: typec: tcpm: add get max power support 2023-06-19 15:34:35 +02:00
usbip usbip: vhci_hcd: Convert to platform remove callback returning void 2023-05-28 12:38:02 +01:00
Kconfig usb: move config USB_USS720 to usb's misc Kconfig 2023-03-29 10:34:08 +02:00
Makefile usb: host: u132-hcd: Delete driver 2023-03-21 14:06:11 +01:00
usb-skeleton.c