From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
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: Wed, 28 Jul 2021 23:37:01 -0400 [thread overview]
Message-ID: <162752979291.3014.727185988515749106.b4-ty@oracle.com> (raw)
In-Reply-To: <20210719231127.869088-1-bvanassche@acm.org>
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
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2021-07-29 3:37 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 [this message]
2021-07-29 14:05 ` Bean Huo
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=162752979291.3014.727185988515749106.b4-ty@oracle.com \
--to=martin.petersen@oracle.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=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.