Received: from eggs.gnu.org ([2001:4830:134:3::10]:60474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTuN0-0000Gm-Jm for qemu-devel@nongnu.org; Tue, 16 Sep 2014 11:08:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTuMu-0000hA-Be for qemu-devel@nongnu.org; Tue, 16 Sep 2014 11:08:42 -0400 From: Markus Armbruster References: <20140916093950.4339b5b9@redhat.com> Date: Tue, 16 Sep 2014 17:08:28 +0200 In-Reply-To: <20140916093950.4339b5b9@redhat.com> (Luiz Capitulino's message of "Tue, 16 Sep 2014 09:39:50 -0400") Message-ID: <87wq93hac3.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2] virtio-balloon: fix integer overflow in memory stats feature List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-devel , qemu-stable@nongnu.org Luiz Capitulino writes: > 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 Reviewed-by: Markus Armbruster