All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
	"Yonggang Luo" <luoyonggang@gmail.com>,
	"Miku Hatsune" <anznu1l@gmail.com>,
	"Philippe Mathieu-Daudé" <philmd@mailo.com>,
	"Zhao Liu" <zhao1.liu@intel.com>,
	"QEMU Stable" <qemu-stable@nongnu.org>
Subject: Re: [PULL v2 09/30] virtio-mmio: fix QUEUE_NUM_MAX
Date: Thu, 30 Jul 2026 06:48:29 -0400	[thread overview]
Message-ID: <20260730064630-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <0702c51b-aec7-4688-a2ec-7363ccdfbc73@tls.msk.ru>

On Thu, Jul 30, 2026 at 08:38:46AM +0300, Michael Tokarev wrote:
> On 7/29/26 13:26, Michael S. Tsirkin wrote:
> > On Wed, Jul 29, 2026 at 12:49:59PM +0300, Michael Tokarev wrote:
> 
> > > The old value basically makes no sense.  We returned a wrong value
> > > here, now we return the correct one.
> > 
> > So now, guest read the big value, and it is writing that value back.
> > But since we changed the value to smaller one now guest is
> > writing a value bigger than the max and out of spec and it will fail.
> > Not nice at all.
> 
> Just to clarify: this might happen only after migration (to qemu "fixed"
> the way I was thinking).

read num before migration, write after migration.

> []
> > I'm not strongly objecting to changing the original patch.
> > This needs a bunch of thought though, as we are breaking a
> > fundamental promise of live migration.
> > And given we are in freeze and it's a CVE, there's some urgency
> > to get the fix merged.
> 
> Yes, I fully understand the time constraints we have here.  Also,
> it's fixed for 11.1+, and the release is coming - and once it's
> out, this whole problem is history already :)
> 
> [...]
> 
> > My suggestion would be to propose a cleanup upstream, including
> > an analysis of the risks, and we'll discuss.
> > 
> > Or you can do original development in the stable branch if you
> > prefer, be my guest, but don't expect it to get same level of
> > scrutiny as upstream code gets. If anything breaks, it's on you.
> 
> There's no need for a stable-only solution which is different in
> logic, since it is the upstream version with current logic which
> we must be able to migrate to anyway.  So any changes needs to be
> in agreement with the upstream.
> 
> > > Ofc it would be ideal - from the back-porting PoV only - to just
> > > drop this all entirely and unconditionally report the correct
> > > queue size to begin with, as per above.
> 
> > A discussion for upstream, imho.
> 
> Yes, this is exactly what I'm doing - discussing it here.
> But without a proposal yet ;))
> 
> Ok.
> 
> For now, for the two active stable series, I'll pick up only this
> change out of the two, and even it reduced to a one-liner I mentioned
> earlier (doing `queue_size = QUEUE_SIZE_MAX`).  This is sufficient to
> fix the bug in stable series (the other change isn't needed).  If
> anything will come touching this place (including a more elegant
> solution), it's trivial to revert it and re-do, no snow-ball effect
> is expected.
> 
> And thank you for your patience!
> 
> /mjt



  reply	other threads:[~2026-07-30 10:49 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27 19:19 [PULL v2 00/30] pci, vhost, virtio, iommu: bugfixes Michael S. Tsirkin
2026-07-27 19:19 ` [PULL v2 01/30] virtio: use masked features with set_features_ex Michael S. Tsirkin
2026-07-28  7:26   ` Paolo Abeni
2026-07-27 19:19 ` [PULL v2 02/30] virtio-net: fix OOB read in RSC receive path Michael S. Tsirkin
2026-07-27 19:19 ` [PULL v2 03/30] virtio-net: fix short frame OOB read in receive_filter() Michael S. Tsirkin
2026-07-27 19:19 ` [PULL v2 04/30] libvhost-user: protect against OOB writes in vu_set_inflight_fd Michael S. Tsirkin
2026-07-27 19:19 ` [PULL v2 05/30] libvhost-user: protect against OOB vring queue access Michael S. Tsirkin
2026-07-27 19:19 ` [PULL v2 06/30] hw/virtio: reject zero-length packed indirect descriptor table Michael S. Tsirkin
2026-07-27 19:19 ` [PULL v2 07/30] vhost: do not crash on ring map failure Michael S. Tsirkin
2026-07-27 19:19 ` [PULL v2 08/30] virtio-scsi: fix SCSIRequest leak on a bad request Michael S. Tsirkin
2026-07-27 19:19 ` [PULL v2 09/30] virtio-mmio: fix QUEUE_NUM_MAX Michael S. Tsirkin
2026-07-28  8:40   ` Michael Tokarev
2026-07-28 19:45     ` Michael S. Tsirkin
2026-07-28 20:17       ` Michael Tokarev
2026-07-28 23:22         ` Michael S. Tsirkin
2026-07-29  5:12           ` Michael Tokarev
2026-07-29  5:24             ` Michael Tokarev
2026-07-29  6:43               ` Michael S. Tsirkin
2026-07-29  9:25             ` Michael Tokarev
2026-07-29  9:38               ` Michael S. Tsirkin
2026-07-29  9:49                 ` Michael Tokarev
2026-07-29 10:26                   ` Michael S. Tsirkin
2026-07-30  5:38                     ` Michael Tokarev
2026-07-30 10:48                       ` Michael S. Tsirkin [this message]
2026-07-27 19:19 ` [PULL v2 10/30] virtio: fix queue size validation against allocated maximum Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 11/30] virtio: stop migrating num_default, validate vring.num on load Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 12/30] virtio: fail early on bad config_len in migration Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 13/30] vhost-user: assert nregions within limit Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 14/30] virtio-pmem: wait for flush requests on unrealize Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 15/30] libvhost-user: validate last_batch_head in vu_check_queue_inflights Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 16/30] libvhost-user: fix heap overflow " Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 17/30] libvduse: validate vq size Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 18/30] virtio-iommu: fix OOM due to unbounded call_rcu Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 19/30] virtio-snd: check rx buffer descriptor size Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 20/30] virtio-snd: check for overflow before g_malloc0 Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 21/30] hw/pci-host/q35.c: Always initialize smram-region even if SMM disabled Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 22/30] hw/pci-host/q35.c: Factor out creation of SMRAM MRs Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 23/30] hw/pci-host/q35.c: Avoid early return in mch_write_config() Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 24/30] hw/virtio/vdpa-dev: pass set_config buffer to vhost backend Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 25/30] hw/cxl: fix OOB access in cxl_doe_cdat_rsp via entry_handle Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 26/30] intel_iommu: Check address mask before using it in pasid-based iotlb invalidation Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 27/30] hw/net/virtio-net: Protect from DMA re-entrancy bugs Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 28/30] hw/virtio-rng: Fix host use-after-free (CVE-2026-50624) Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 29/30] backends/rng: cap request size to avoid oversized allocation Michael S. Tsirkin
2026-07-27 19:20 ` [PULL v2 30/30] virtio: avoid packed vring virtio_queue_empty() infinite loops (CVE-2026-16457) Michael S. Tsirkin
2026-07-28 11:42 ` [PULL v2 00/30] pci, vhost, virtio, iommu: bugfixes Stefan Hajnoczi

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=20260730064630-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=anznu1l@gmail.com \
    --cc=luoyonggang@gmail.com \
    --cc=mjt@tls.msk.ru \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@mailo.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=zhao1.liu@intel.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.