From: Stefan Hajnoczi <stefanha@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-stable@nongnu.org,
Mark Cave-Ayland <mark.caveayland@nutanix.com>
Subject: Re: [PATCH 0/2] scsi-disk: fix race between WRITE SAME and MODE SELECT
Date: Wed, 26 Aug 2026 14:52:11 -0400 [thread overview]
Message-ID: <20260826185211.GA330950@fedora> (raw)
In-Reply-To: <20260826181725.849718-1-pbonzini@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 812 bytes --]
On Wed, Aug 26, 2026 at 08:17:23PM +0200, Paolo Bonzini wrote:
> A guest with an attached scsi-hd can force QEMU's SCSI disk emulation
> to read roughly 60 KiB past the end of a heap buffer, copying that out
> of bounds host memory into the guest's own disk image.
>
> This is due to a race between WRITE SAME and an obscure MODE SELECT
> feature which can be restricted to the Q800 machine.
>
> Paolo
>
> Paolo Bonzini (2):
> scsi-disk: fix out-of-bound read in WRITE SAME
> scsi: hide MODE SELECT block size change behind a quirk
>
> include/hw/scsi/scsi.h | 1 +
> hw/m68k/q800.c | 2 ++
> hw/scsi/scsi-disk.c | 17 +++++++++++++----
> 3 files changed, 16 insertions(+), 4 deletions(-)
>
> --
> 2.55.0
>
>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2026-08-26 18:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 18:17 [PATCH 0/2] scsi-disk: fix race between WRITE SAME and MODE SELECT Paolo Bonzini
2026-08-26 18:17 ` [PATCH 1/2] scsi-disk: fix out-of-bound read in WRITE SAME Paolo Bonzini
2026-08-26 18:59 ` Philippe Mathieu-Daudé
2026-08-26 18:17 ` [PATCH 2/2] scsi: hide MODE SELECT block size change behind a quirk Paolo Bonzini
2026-08-27 20:12 ` Mark Cave-Ayland
2026-08-26 18:52 ` Stefan Hajnoczi [this message]
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=20260826185211.GA330950@fedora \
--to=stefanha@redhat.com \
--cc=mark.caveayland@nutanix.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/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.