mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stanley Jhu <stanleyjhu@google.com>
To: "Martin K. Petersen" <mkp@kernel.org>,
	 "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Alim Akhtar <alim.akhtar@samsung.com>,
	Bart Van Assche <bvanassche@acm.org>,
	 Bean Huo <beanhuo@micron.com>,
	Peter Wang <peter.wang@mediatek.com>,
	 Brian Kao <powenkao@google.com>,
	linux-scsi@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] scsi: ufs: bsg: Validate request_len before accessing request
Date: Thu, 15 Oct 2026 08:29:17 +0800	[thread overview]
Message-ID: <20261015002917.3469020-1-stanleyjhu@google.com> (raw)
In-Reply-To: <sashiko-outbox-169538@kernel.org>

On Tue, Oct 13, 2026 at 10:44:34AM +0000, sashiko-bot@kernel.org wrote:
> Later, ufs_bsg_request() sets job->reply_len to 104 for RPMB replies,
> which configures the block layer to copy 104 bytes to user space from
> this 96-byte allocation. Will this leak adjacent heap memory to userspace?

Pre-existing; fixed separately in bsg-lib:
https://lore.kernel.org/all/20261013132708.1669415-1-stanleyjhu@google.com/

> Should this error path instead call bsg_job_done(job, -EINVAL, 0)
> and return 0 to ensure proper teardown?

Yes, done in v2 (1/5 and 3/5):
https://lore.kernel.org/all/20261015001855.3450573-1-stanleyjhu@google.com/

       reply	other threads:[~2026-10-15  0:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <sashiko-outbox-169538@kernel.org>
2026-10-15  0:29 ` Stanley Jhu [this message]
2026-10-13 10:29 [PATCH 0/3] scsi: ufs: Fix UIC result byte and BSG request length handling Stanley Jhu
2026-10-13 10:29 ` [PATCH 1/3] scsi: ufs: bsg: Validate request_len before accessing request Stanley Jhu
2026-10-14 10:02   ` Bean Huo

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=20261015002917.3469020-1-stanleyjhu@google.com \
    --to=stanleyjhu@google.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mkp@kernel.org \
    --cc=peter.wang@mediatek.com \
    --cc=powenkao@google.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®