[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [PATCH v2] virtio-balloon: fix integer overflow in mem
From: |
Eric Blake |
Subject: |
Re: [Qemu-stable] [PATCH v2] virtio-balloon: fix integer overflow in memory stats feature |
Date: |
Tue, 16 Sep 2014 07:55:58 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 |
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 <address@hidden>
> ---
> hw/virtio/virtio-balloon.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature