From: Eric Blake <eblake@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>
Cc: qemu-stable@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] virtio-balloon: fix integer overflow in memory stats feature
Date: Tue, 16 Sep 2014 07:55:58 -0600 [thread overview]
Message-ID: <5418416E.7010300@redhat.com> (raw)
In-Reply-To: <20140916093950.4339b5b9@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 939 bytes --]
On 09/16/2014 07:39 AM, Luiz Capitulino wrote:
> When a QMP client changes the polling interval time by setting
> the guest-stats-polling-interval property, the interval value
> is stored and manipulated as an int64_t variable.
>
> However, the balloon_stats_change_timer() function, which is
> used to set the actual timer with the interval value, takes
> an int instead, causing an overflow for big interval values.
>
> This commit fix this bug by changing balloon_stats_change_timer()
> to take an int64_t and also it limits the polling interval value
> to UINT_MAX to avoid other kinds of overflow.
>
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> ---
> hw/virtio/virtio-balloon.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]
next prev parent reply other threads:[~2014-09-16 13:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 13:39 [Qemu-devel] [PATCH v2] virtio-balloon: fix integer overflow in memory stats feature Luiz Capitulino
2014-09-16 13:55 ` Eric Blake [this message]
2014-09-16 15:02 ` Michael S. Tsirkin
2014-09-16 14:02 ` Luiz Capitulino
2014-09-16 15:08 ` 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=5418416E.7010300@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=lcapitulino@redhat.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.