All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: marcandre.lureau@redhat.com
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] ui/dbus: validate clipboard selection in Release handler
Date: Tue, 10 Nov 2026 14:43:00 +0000	[thread overview]
Message-ID: <avMtdCULKgwPYk0i@redhat.com> (raw)
In-Reply-To: <20261019092351.2435194-2-marcandre.lureau@redhat.com>

On Mon, Oct 19, 2026 at 01:23:51PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> The clipboard "Release" D-Bus method handler passes the caller provided
> selection to qemu_clipboard_peer_release() without any bounds check,
> unlike the "Grab" and "Request" handlers.
> 
> An out-of-range selection reaches qemu_clipboard_info(), which asserts
> selection < QEMU_CLIPBOARD_SELECTION__COUNT and aborts QEMU (with
> asserts compiled out, it would index the cbinfo[] array out of bounds).
> 
> Reject invalid selections with an error, following the same pattern as
> the other clipboard handlers.
> 
> Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4717
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  ui/dbus-clipboard.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)

If you remove the text about "with asserts compiled out..." as Peter
suggested, then

  Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



      parent reply	other threads:[~2026-11-10 14:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19  9:23 [PATCH] ui/dbus: validate clipboard selection in Release handler marcandre.lureau
2026-10-19  9:51 ` Peter Maydell
2026-11-10 14:43 ` Daniel P. Berrangé [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=avMtdCULKgwPYk0i@redhat.com \
    --to=berrange@redhat.com \
    --cc=marcandre.lureau@redhat.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.