lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bcd555740e1168fb9237683b136cdfdac9a6916a.camel@iokpp.de>
Date: Thu, 02 Oct 2025 06:31:39 +0200
From: Bean Huo <beanhuo@...pp.de>
To: Avri Altman <Avri.Altman@...disk.com>, "avri.altman@....com"
 <avri.altman@....com>, "bvanassche@....org" <bvanassche@....org>, 
 "alim.akhtar@...sung.com" <alim.akhtar@...sung.com>, "jejb@...ux.ibm.com"
 <jejb@...ux.ibm.com>,  "martin.petersen@...cle.com"
 <martin.petersen@...cle.com>, "can.guo@....qualcomm.com"
 <can.guo@....qualcomm.com>, "ulf.hansson@...aro.org"
 <ulf.hansson@...aro.org>,  "beanhuo@...ron.com" <beanhuo@...ron.com>,
 "jens.wiklander@...aro.org" <jens.wiklander@...aro.org>
Cc: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>, 
	"linux-kernel@...r.kernel.org"
	 <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/3] scsi: ufs: core: fix incorrect buffer
 duplication in ufshcd_read_string_desc()

On Wed, 2025-10-01 at 10:03 +0000, Avri Altman wrote:
> > From: Bean Huo <beanhuo@...ron.com>
> > 
> > The function ufshcd_read_string_desc() was duplicating memory starting from
> > the beginning of struct uc_string_id, which included the length and type
> > fields. As a result, the allocated buffer contained unwanted metadata in
> > addition to the string itself.
> > 
> > The correct behavior is to duplicate only the Unicode character array in the
> > structure. Update the code so that only the actual string content is copied
> > into
> > the new buffer.
> 2 Nits - only If you'll have another spin:
> Nit 1: maybe add one more sentence: This does not imply any ABI change as
> there are no current callers with SD_RAW
> Nit 2: you might want to remove the duplicate definitions of SD_ASCII_STD &
> SD_RAW

yes, thanks Avri. I will address it in next version.

Kind regards,
Bean

> 
> > 
> > Fixes: 5f57704dbcfe ("scsi: ufs: Use kmemdup in ufshcd_read_string_desc()")
> > Signed-off-by: Bean Huo <beanhuo@...ron.com>
> Reviewed-by: Avri Altman <avri.altman@...disk.com>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ