All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bean Huo <huobean@gmail.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Bart Van Assche <bvanassche@acm.org>
Cc: Avri Altman <avri.altman@wdc.com>, Bean Huo <beanhuo@micron.com>,
	Can Guo <cang@codeaurora.org>,
	linux-scsi@vger.kernel.org,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	Asutosh Das <asutoshd@codeaurora.org>,
	Stanley Chu <stanley.chu@mediatek.com>,
	Jaegeuk Kim <jaegeuk@kernel.org>
Subject: Re: [PATCH] scsi: ufs: Fix memory corruption by ufshcd_read_desc_param()
Date: Thu, 29 Jul 2021 16:05:21 +0200	[thread overview]
Message-ID: <36eeace45248316f4c674bff0ae1d0b598e669aa.camel@gmail.com> (raw)
In-Reply-To: <162752979291.3014.727185988515749106.b4-ty@oracle.com>

On Wed, 2021-07-28 at 23:37 -0400, Martin K. Petersen wrote:
> On Mon, 19 Jul 2021 16:11:22 -0700, Bart Van Assche wrote:
> 
> 
> 
> > If param_offset > buff_len then the memcpy() statement in
> > ufshcd_read_desc_param() corrupts memory since it copies
> > 256 + buff_len - param_offset bytes into a buffer with size
> > buff_len.
> > Since param_offset < 256 this results in writing past the bound of
> > the
> > output buffer.
> 
> 
> Applied to 5.14/scsi-fixes, thanks!
> 
> 
> 
> [1/1] scsi: ufs: Fix memory corruption by ufshcd_read_desc_param()
> 
>       https://git.kernel.org/mkp/scsi/c/b1d5de8c6ea2

Hi Martin,
This patch has a problem, we should revert it.

and the correct fix patch is in Bart's another series of patch:
https://patchwork.kernel.org/project/linux-scsi/patch/20210722033439.26550-2-bvanassche@acm.org/

Bean


  reply	other threads:[~2021-07-29 14:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19 23:11 [PATCH] scsi: ufs: Fix memory corruption by ufshcd_read_desc_param() Bart Van Assche
2021-07-20  6:45 ` Avri Altman
2021-07-20 16:01   ` Bart Van Assche
2021-07-29  3:37 ` Martin K. Petersen
2021-07-29 14:05   ` Bean Huo [this message]
2021-07-30  2:56     ` Martin K. Petersen

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=36eeace45248316f4c674bff0ae1d0b598e669aa.camel@gmail.com \
    --to=huobean@gmail.com \
    --cc=asutoshd@codeaurora.org \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=cang@codeaurora.org \
    --cc=jaegeuk@kernel.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stanley.chu@mediatek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.