From: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, philmd@oss.qualcomm.com, den@openvz.org
Subject: Re: [PATCH 0/3] hw/display/qxl: Avoid crashing on stale guest addresses in qxl_post_load
Date: Wed, 26 Aug 2026 12:47:52 +0300 [thread overview]
Message-ID: <9106512e-54cd-4513-963f-59e50063bfcc@virtuozzo.com> (raw)
In-Reply-To: <CAJ+F1CKwNr=6wVaO+tXa876EzoPjYfQC3qx=em3C4BSW7wRC8Q@mail.gmail.com>
On 8/26/26 11:10 AM, Marc-André Lureau wrote:
> Hi Andrey
>
> On Tue, Aug 25, 2026 at 9:26 PM Andrey Drobyshev
> <andrey.drobyshev@virtuozzo.com> wrote:
>>
>> We've experienced crashes when spice-server aborts on migration target
>> when processing an invalid/stale guest address pointer. While those are
>> hard to reproduce, it seems they can be fairly easily avoided by simply
>> skipping commands with invalid addresses in qxl_post_load.
>
> I would rather try to find the root cause, rather than applying a
> post-load workaround. It may be related to this issue
> https://gitlab.com/qemu-project/qemu/-/work_items/3766 (confidential):
> there is a lack of resource tracking, when a guest release
> slot/cursors etc, the track commands may not be correctly updated - or
> preventing resource release. Unfortunately, spice/qxl is no longer
> maintained - we should clearly mark this device as unsecure imho.
>
>> [...]
I agree on all points. AFAIU this is a use-after-free of a tracked guest
pointer. I'm not sure whether we can reliably track whenever guest
frees a buffer, so we drop it from the cmd list. Still, I'd argue that
my 2nd patch here adds some hardening:
1. Currently we consume guest-controlled bytes which reach
memslot_get_virt() in spice-server, which aborts on the migration
target. So there's a potential for guest->host DoS.
2. Dropping invalid commands is cheap, as we just don't replay cursor
movements on the target - instead wait until guest sets it again. IMHO
this kind of hardening would make sense even if we did remedy the root
cause.
Andrey
next prev parent reply other threads:[~2026-08-26 9:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 17:20 [PATCH 0/3] hw/display/qxl: Avoid crashing on stale guest addresses in qxl_post_load Andrey Drobyshev
2026-08-25 17:20 ` [PATCH 1/3] hw/display/qxl: factor out qxl_guest_phys2virt() Andrey Drobyshev
2026-08-25 17:20 ` [PATCH 2/3] hw/display/qxl: validate replayed commands in qxl_post_load Andrey Drobyshev
2026-08-25 17:20 ` [PATCH 3/3] hw/display/qxl: trace skipped stale loadvm commands Andrey Drobyshev
2026-08-26 8:10 ` [PATCH 0/3] hw/display/qxl: Avoid crashing on stale guest addresses in qxl_post_load Marc-André Lureau
2026-08-26 9:47 ` Andrey Drobyshev [this message]
2026-08-26 13:26 ` Denis V. Lunev
2026-09-12 11:52 ` Marc-André Lureau
2026-09-14 13:57 ` Michael Tokarev
2026-09-14 14:11 ` Andrey Drobyshev
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=9106512e-54cd-4513-963f-59e50063bfcc@virtuozzo.com \
--to=andrey.drobyshev@virtuozzo.com \
--cc=den@openvz.org \
--cc=marcandre.lureau@redhat.com \
--cc=philmd@oss.qualcomm.com \
--cc=qemu-devel@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.