All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Alexandre Becholey" <alex@becholey.ch>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: image: microtek: don't receive REQUEST SENSE data into sense_buffer
Date: Thu, 19 Nov 2026 08:49:27 +0000	[thread overview]
Message-ID: <sashiko-outbox-222720@kernel.org> (raw)
In-Reply-To: <20261119084526.535901-1-alex@becholey.ch>

> mts_command_done() receives the data phase of a REQUEST SENSE into
> srb->sense_buffer (SCSI_SENSE_BUFFERSIZE, 96 bytes), but with the
> length of the command's own data buffer. A REQUEST SENSE sent through
> SG_IO, allowed on a read-only /dev/sgN without any capability, can have
> a much larger buffer (252 bytes with sg_requests), and a device that
> returns that much writes past the end of the sense buffer.
> 
> The special case is not needed: for the error handler's own REQUEST
> SENSE, scsi_eh_prep_cmnd() already points the data buffer at
> sense_buffer with at most SCSI_SENSE_BUFFERSIZE. Handle REQUEST SENSE
> like every other data-in command.
> 
> The bug was found, and the reproducer and this fix were written, by AI
> agents (Claude Mythos and Claude Opus models). The analysis and the
> patch were reviewed by a human.
> 
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Signed-off-by: Alexandre Becholey <alex@becholey.ch>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261119084526.535901-1-alex@becholey.ch?part=1


  reply	other threads:[~2026-11-19  8:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19  8:45 [PATCH] usb: image: microtek: don't receive REQUEST SENSE data into sense_buffer Alexandre Becholey
2026-11-19  8:49 ` sashiko-bot [this message]
2026-11-19 12:02 ` Oliver Neukum
2026-11-19 12:28   ` Alexandre Becholey
2026-11-19 12:51     ` Oliver Neukum
2026-11-20 15:14       ` Alexandre Becholey

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=sashiko-outbox-222720@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=alex@becholey.ch \
    --cc=linux-usb@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.