From: "Peter Wang (王信友)" <peter.wang@mediatek.com>
To: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"liqiang01@kylinos.cn" <liqiang01@kylinos.cn>
Cc: "beanhuo@micron.com" <beanhuo@micron.com>,
"avri.altman@wdc.com" <avri.altman@wdc.com>,
"tomas.winkler@intel.com" <tomas.winkler@intel.com>,
"bvanassche@acm.org" <bvanassche@acm.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"can.guo@oss.qualcomm.com" <can.guo@oss.qualcomm.com>,
"James.Bottomley@HansenPartnership.com"
<James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH v2 6/6] scsi: ufs: debugfs: Reserve space for a string terminator
Date: Mon, 20 Jul 2026 09:16:28 +0000 [thread overview]
Message-ID: <ac16a85bf2a882b04bf45d0c84c582590b74a3f3.camel@mediatek.com> (raw)
In-Reply-To: <20260717153914.26321-7-liqiang01@kylinos.cn>
On Fri, 2026-07-17 at 23:39 +0800, Li Qiang wrote:
> ufs_saved_err_write() copies user input into a zero-initialized stack
> buffer and passes it to kstrtoint(). A write that fills the entire
> buffer overwrites its only terminator.
>
> Reject an input whose length leaves no room for the trailing NUL.
>
> Fixes: 7340faae9474 ("scsi: ufs: core: Add debugfs attributes for
> triggering the UFS EH")
> Signed-off-by: Li Qiang <liqiang01@kylinos.cn>
> ---
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
next prev parent reply other threads:[~2026-07-20 9:16 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 6:19 [PATCH 0/5] scsi: ufs: Fix descriptor parsing and invalid input handling liqiang
2026-07-16 6:19 ` [PATCH 1/5] scsi: ufs: core: Validate string descriptors liqiang
2026-07-16 17:47 ` Bart Van Assche
2026-07-17 15:35 ` Li Qiang
2026-07-16 6:19 ` [PATCH 2/5] scsi: ufs: Fix NULL dereferences after tag lookup liqiang
2026-07-16 17:52 ` Bart Van Assche
2026-07-16 6:19 ` [PATCH 3/5] scsi: ufs: core: Validate connected lane counts liqiang
2026-07-16 6:19 ` [PATCH 4/5] scsi: ufs: rpmb: Validate frame before parsing liqiang
2026-07-16 17:58 ` Bart Van Assche
2026-07-16 6:19 ` [PATCH 5/5] scsi: ufs: debugfs: Reserve space for a string terminator liqiang
2026-07-16 17:56 ` Bart Van Assche
2026-07-16 17:42 ` [PATCH 0/5] scsi: ufs: Fix descriptor parsing and invalid input handling Bart Van Assche
2026-07-17 15:16 ` Li Qiang
2026-07-17 15:39 ` [PATCH v2 0/6] " Li Qiang
2026-07-17 15:39 ` [PATCH v2 1/6] scsi: ufs: core: Validate string descriptors Li Qiang
2026-07-20 9:13 ` Peter Wang (王信友)
2026-07-22 18:06 ` Bart Van Assche
2026-07-17 15:39 ` [PATCH v2 2/6] scsi: ufs: Avoid NULL CQE dereference when reporting invalid tags Li Qiang
2026-07-20 9:14 ` Peter Wang (王信友)
2026-07-22 18:07 ` Bart Van Assche
2026-07-17 15:39 ` [PATCH v2 3/6] scsi: ufs: core: Validate connected lane counts Li Qiang
2026-07-17 15:39 ` [PATCH v2 4/6] scsi: ufs: rpmb: Validate request frame length before parsing Li Qiang
2026-07-20 9:15 ` Peter Wang (王信友)
2026-07-22 12:04 ` Bean Huo
2026-07-17 15:39 ` [PATCH v2 5/6] scsi: ufs: rpmb: Use unaligned accessors for RPMB frames Li Qiang
2026-07-20 9:15 ` Peter Wang (王信友)
2026-07-22 12:33 ` Bean Huo
2026-07-22 13:54 ` Bart Van Assche
2026-07-23 8:12 ` David Laight
2026-07-17 15:39 ` [PATCH v2 6/6] scsi: ufs: debugfs: Reserve space for a string terminator Li Qiang
2026-07-20 9:16 ` Peter Wang (王信友) [this message]
2026-07-22 18:08 ` Bart Van Assche
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=ac16a85bf2a882b04bf45d0c84c582590b74a3f3.camel@mediatek.com \
--to=peter.wang@mediatek.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=can.guo@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=liqiang01@kylinos.cn \
--cc=martin.petersen@oracle.com \
--cc=tomas.winkler@intel.com \
/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
all inboxes | Powered by JetHome®