From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org
Cc: Eduardo Habkost <eduardo@habkost.net>, kraxel@redhat.com
Subject: Re: [PATCH] ui/dbus: fix buffer-overflow detected by ASAN
Date: Wed, 22 Dec 2021 20:11:23 +0100	[thread overview]
Message-ID: <f2e46e6d-8878-e970-86a0-3572f11eb398@redhat.com> (raw)
In-Reply-To: <20211222144032.443424-1-marcandre.lureau@redhat.com>
On 12/22/21 15:40, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> On the last added dbus patch, I left a tiny BO:
> 
> ==441487==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x611000025a70 at pc 0x7f0817bb764c bp 0x7ffde672ae60 sp 0x7ffde672ae58
> WRITE of size 8 at 0x611000025a70 thread T0
>     #0 0x7f0817bb764b in dbus_vc_class_init ../ui/dbus.c:401
> 
> A cookie for ASAN! not you C :)
> 
Fixes: 7f767ca35e5 ("ui/dbus: register D-Bus VC handler")
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  ui/dbus.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/ui/dbus.c b/ui/dbus.c
> index b2c1c9fb522c..0074424c1fed 100644
> --- a/ui/dbus.c
> +++ b/ui/dbus.c
> @@ -405,6 +405,7 @@ dbus_vc_class_init(ObjectClass *oc, void *data)
>  static const TypeInfo dbus_vc_type_info = {
>      .name = TYPE_CHARDEV_VC,
>      .parent = TYPE_CHARDEV_DBUS,
> +    .class_size = sizeof(DBusVCClass),
>      .class_init = dbus_vc_class_init,
>  };
>  
     prev parent reply	other threads:[~2021-12-22 19:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22 14:40 [PATCH] ui/dbus: fix buffer-overflow detected by ASAN marcandre.lureau
2021-12-22 19:11 ` Philippe Mathieu-Daudé [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=f2e46e6d-8878-e970-86a0-3572f11eb398@redhat.com \
    --to=philmd@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=kraxel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).