mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] usb: initialize debugfs command buffers
@ 2026-10-21 10:47 Jiale Yao
  2026-10-21 10:47 ` [PATCH 1/4] usb: dwc2: initialize debugfs command buffer Jiale Yao
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Jiale Yao @ 2026-10-21 10:47 UTC (permalink / raw)
  To: Minas Harutyunyan, Greg Kroah-Hartman, Mathias Nyman,
	Chunfeng Yun, John Youn, Felipe Balbi, Mian Yousaf Kaukab,
	Yoshihiro Shimoda, linux-usb, linux-kernel, linux-arm-kernel,
	linux-mediatek

Several USB debugfs write handlers copy user input into uninitialized stack
buffers and then compare fixed command lengths. A short write that matches a
command prefix can therefore make strncmp() inspect uninitialized bytes.

Zero-initialize the affected command buffers so every copied input is
terminated and the comparisons do not depend on stale stack contents.

Jiale Yao (4):
  usb: dwc2: initialize debugfs command buffer
  usb: gadget: renesas_usb3: initialize debugfs command buffer
  xhci: debugfs: initialize command buffer
  usb: mtu3: initialize debugfs command buffer

 drivers/usb/dwc2/debugfs.c            | 2 +-
 drivers/usb/gadget/udc/renesas_usb3.c | 2 +-
 drivers/usb/host/xhci-debugfs.c       | 2 +-
 drivers/usb/mtu3/mtu3_debugfs.c       | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-21 12:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-21 10:47 [PATCH 0/4] usb: initialize debugfs command buffers Jiale Yao
2026-10-21 10:47 ` [PATCH 1/4] usb: dwc2: initialize debugfs command buffer Jiale Yao
2026-10-21 10:47 ` [PATCH 2/4] usb: gadget: renesas_usb3: " Jiale Yao
2026-10-21 10:47 ` [PATCH 3/4] xhci: debugfs: initialize " Jiale Yao
2026-10-21 12:41   ` Mathias Nyman
2026-10-21 10:47 ` [PATCH 4/4] usb: mtu3: initialize debugfs " Jiale Yao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®