Linux wireless drivers development
 help / color / mirror / Atom feed
From: Jiale Yao <yaojiale02@163.com>
To: "Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Vinod Koul" <vkoul@kernel.org>, "Frank Li" <Frank.Li@kernel.org>,
	"Michal Simek" <michal.simek@amd.com>,
	"Jeff Johnson" <jjohnson@kernel.org>,
	"Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Andres Salomon" <dilinger@queued.net>,
	"Thomas Gleixner" <tglx@kernel.org>, "Paul Fox" <pgf@laptop.org>,
	"Dan Carpenter" <error27@gmail.com>,
	"Vasanthakumar Thiagarajan"
	<vasanthakumar.thiagarajan@oss.qualcomm.com>,
	"Hyun Kwon" <hyun.kwon@xilinx.com>,
	dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
	ath12k@lists.infradead.org, platform-driver-x86@vger.kernel.org
Cc: Jiale Yao <yaojiale02@163.com>
Subject: [PATCH 0/3] debugfs: Reserve space for string terminators
Date: Sat, 26 Sep 2026 20:12:47 +0800	[thread overview]
Message-ID: <20260926121250.3258285-1-yaojiale02@163.com> (raw)

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


             reply	other threads:[~2026-09-26 12:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-26 12:12 Jiale Yao [this message]
2026-09-26 12:12 ` [PATCH 2/3] wifi: ath12k: Reserve space for a string terminator Jiale Yao
2026-09-26 12:33   ` Dan Carpenter
2026-09-28 17:36   ` Rameshkumar Sundaram
2026-09-29  2:35   ` Baochen Qiang
2026-10-03 23:07   ` Jeff Johnson
2026-10-08 17:38 ` [PATCH 0/3] debugfs: Reserve space for string terminators Ilpo Järvinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260926121250.3258285-1-yaojiale02@163.com \
    --to=yaojiale02@163.com \
    --cc=Frank.Li@kernel.org \
    --cc=ath12k@lists.infradead.org \
    --cc=dilinger@queued.net \
    --cc=dmaengine@vger.kernel.org \
    --cc=error27@gmail.com \
    --cc=hansg@kernel.org \
    --cc=hyun.kwon@xilinx.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jjohnson@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=pgf@laptop.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=tglx@kernel.org \
    --cc=vasanthakumar.thiagarajan@oss.qualcomm.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox