All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <mlureau@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	qemu-devel@nongnu.org, "paolo bonzini" <paolo.bonzini@gmail.com>,
	qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4 2/3] qapi: fix crash when a parameter is missing
Date: Wed, 5 Oct 2016 04:34:36 -0400 (EDT)	[thread overview]
Message-ID: <1707587810.501720.1475656476659.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <871szv1a5i.fsf@dusky.pond.sub.org>

Hi Markus

----- Original Message -----
> Markus Armbruster <armbru@redhat.com> writes:
> 
> > Marc-André Lureau <marcandre.lureau@redhat.com> writes:
> >
> >> Calling:
> >>
> >> { "execute": "qom-set",
> >>   "arguments": { "path": "/machine", "property": "rtc-time" } }
> >>
> >> Will crash with:
> >>
> >> qapi/qapi-visit-core.c:277: visit_type_any: Assertion `!err != !*obj'
> >> failed
> >
> > This is actually a recent regression.  Let's add "Broken in commit
> > 5c678ee."  Can do on commit.
> >
> >> Clear the obj and return an error.
> >>
> >> The patch also fixes a similar potential crash in qmp_input_type_null()
> >> by checking qmp_input_get_object() returned a valid qobj.
> >>
> >> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> >> Reviewed-by: Eric Blake <eblake@redhat.com>
> 
> I'd like to rephrase like this, if it's all right with you:
> 
>     qapi: Fix crash when 'any' or 'null' parameter is missing
> 
>     Unlike the other visit methods, visit_type_any() and visit_type_null()
>     neglect to check whether qmp_input_get_object() succeeded.  They crash
>     when it fails.  Reproducer:
> 
>     { "execute": "qom-set",
>       "arguments": { "path": "/machine", "property": "rtc-time" } }
> 
>     Will crash with:
> 
>     qapi/qapi-visit-core.c:277: visit_type_any: Assertion `!err != !*obj'
>     failed
> 
>     Broken in commit 5c678ee.  Fix by adding the missing error checks.
> 
> Also:
> Reviewed-by: Markus Armbruster <armbru@redhat.com>

Looks good to me, thanks
> 

  reply	other threads:[~2016-10-05  8:34 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22 20:39 [Qemu-devel] [PATCH v4 0/3] Fix some qapi assert() Marc-André Lureau
2016-09-22 20:39 ` [Qemu-devel] [PATCH v4 1/3] qmp: fix object-add assert() without props Marc-André Lureau
2016-09-23  6:52   ` Xiao Long Jiang
2016-09-29 15:23     ` Markus Armbruster
2016-10-05 10:27       ` Christian Borntraeger
2016-10-10  6:49       ` Xiao Long Jiang
2016-10-05  7:47   ` Markus Armbruster
2016-09-22 20:39 ` [Qemu-devel] [PATCH v4 2/3] qapi: fix crash when a parameter is missing Marc-André Lureau
2016-09-29 15:42   ` Markus Armbruster
2016-10-05  8:18     ` Markus Armbruster
2016-10-05  8:34       ` Marc-André Lureau [this message]
2016-09-22 20:39 ` [Qemu-devel] [PATCH v4 3/3] tests: start generic qemu-qmp tests Marc-André Lureau
2016-09-29 16:28   ` Markus Armbruster
2016-10-05  9:56   ` Markus Armbruster
2016-10-05 10:16     ` Marc-André Lureau
2016-10-05 12:35       ` Markus Armbruster
2016-10-05 13:02         ` Marc-André Lureau
2016-10-05 14:38           ` Markus Armbruster
2016-10-05 15:14             ` Marc-André Lureau
2016-10-06 13:26               ` Markus Armbruster
2016-10-07 18:15   ` Markus Armbruster
2016-10-10  8:24     ` Marc-André Lureau
2016-10-10 13:14       ` Markus Armbruster
2016-10-04 15:23 ` [Qemu-devel] [PATCH 2.5/3] tests/test-qmp-input-strict: Cover missing struct members Markus Armbruster
2016-10-04 16:34   ` no-reply
2016-10-06 13:26 ` [Qemu-devel] [PATCH v4 0/3] Fix some qapi assert() Markus Armbruster

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=1707587810.501720.1475656476659.JavaMail.zimbra@redhat.com \
    --to=mlureau@redhat.com \
    --cc=armbru@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=paolo.bonzini@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@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.