mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] debugfs: Reserve space for string terminators
@ 2026-09-26 12:12 Jiale Yao
  2026-09-26 12:12 ` [PATCH 1/3] platform/olpc: Reserve space for a string terminator Jiale Yao
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jiale Yao @ 2026-09-26 12:12 UTC (permalink / raw)
  To: Laurent Pinchart, Vinod Koul, Frank Li, Michal Simek,
	Jeff Johnson, Hans de Goede, Ilpo Järvinen, Andres Salomon,
	Thomas Gleixner, Paul Fox, Dan Carpenter,
	Vasanthakumar Thiagarajan, Hyun Kwon, dmaengine,
	linux-arm-kernel, linux-kernel, linux-wireless, ath12k,
	platform-driver-x86
  Cc: Jiale Yao

The same boundary mistake appears in three debugfs write handlers. Each
handler has a zero-initialized buffer and allows a user write to fill the
entire buffer. That overwrites the only NUL terminator before the input
is parsed with sscanf(), strsep(), or strcasecmp(), which can then read
beyond the end of the buffer.

The write paths are independent, so the fixes are split by file and can
be applied separately. Each patch reserves one byte for the terminating
NUL while preserving the normal input size for that handler.

Jiale Yao (3):
  platform/olpc: Reserve space for a string terminator
  wifi: ath12k: Reserve space for a string terminator
  dmaengine: xilinx: dpdma: Reserve space for a string terminator

 drivers/dma/xilinx/xilinx_dpdma.c                   | 2 +-
 drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c | 2 +-
 drivers/platform/olpc/olpc-ec.c                     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-09-26 14:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-26 12:12 [PATCH 0/3] debugfs: Reserve space for string terminators Jiale Yao
2026-09-26 12:12 ` [PATCH 1/3] platform/olpc: Reserve space for a string terminator Jiale Yao
2026-09-26 12:12 ` [PATCH 2/3] wifi: ath12k: " Jiale Yao
2026-09-26 12:33   ` Dan Carpenter
2026-09-26 12:12 ` [PATCH 3/3] dmaengine: xilinx: dpdma: " Jiale Yao
2026-09-26 14:34   ` Laurent Pinchart

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®