All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Fabiano Rosas" <farosas@suse.de>,
	qemu-devel@nongnu.org, "Stefano Garzarella" <sgarzare@redhat.com>,
	김승중 <seungjung0711@gmail.com>,
	"Alexandr Moshkov" <dtalexundeer@yandex-team.ru>
Subject: Re: [PATCH] vhost/migration: Fix incorrect size used in inflight->addr in VMSD
Date: Wed, 29 Jul 2026 15:27:01 -0400	[thread overview]
Message-ID: <ampUBV4wAluFGW93@x1.local> (raw)
In-Reply-To: <20260729145247-mutt-send-email-mst@kernel.org>

On Wed, Jul 29, 2026 at 02:57:57PM -0400, Michael S. Tsirkin wrote:
> On Wed, Jul 29, 2026 at 01:48:25PM -0400, Peter Xu wrote:
> > So to me, it's much simpler we say migration stream must be
> > trusted, and I expect dest QEMU can allocate any buffer it needs, until it
> > eats the whole system memory.  I really don't see much real risk..
> 
> It's not risk due to migration, specifically. But making qemu
> drink up terabytes from the guest would be problematic, right?
> 
> Putting qemu in a cgroup with restricted total memory
> would be one way to prevent this class of security issue,
> and a robust one.
> 
> But that, in turn, is impossible if qemu insists on allocating
> unlimited memory at the drop of a hat.

Just to clarify at least one thing.. we have two attack surfaces here and
they're very different IMHO:

(1) guest behavior caused memory allocation, or,

(2) migration stream caused memory allocation.

AFAIU, (1) is more severe. All my points only apply to (2).

> 
> However, migration is hardly the worst offender here, and I am
> not at all sure we need to start with it if we even want
> to address this limitation.

Agree.

Thanks,

-- 
Peter Xu



  reply	other threads:[~2026-07-29 19:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 15:39 [PATCH] vhost/migration: Fix incorrect size used in inflight->addr in VMSD Peter Xu
2026-07-28 20:57 ` Fabiano Rosas
2026-07-29 14:00   ` Peter Xu
2026-07-29 14:25     ` Michael S. Tsirkin
2026-07-29 14:27     ` Fabiano Rosas
2026-07-29 15:44       ` Peter Xu
2026-07-29 16:13         ` Fabiano Rosas
2026-07-29 17:40           ` Peter Xu
2026-07-29 17:48           ` Peter Xu
2026-07-29 18:57             ` Michael S. Tsirkin
2026-07-29 19:27               ` Peter Xu [this message]
2026-07-28 23:17 ` Michael S. Tsirkin
2026-07-29  7:25 ` Alexandr Moshkov
2026-07-29  8:49   ` Michael S. Tsirkin
2026-07-29 14:16     ` Peter Xu

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=ampUBV4wAluFGW93@x1.local \
    --to=peterx@redhat.com \
    --cc=dtalexundeer@yandex-team.ru \
    --cc=farosas@suse.de \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seungjung0711@gmail.com \
    --cc=sgarzare@redhat.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.