From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WW0en-0000JK-VP for qemu-devel@nongnu.org; Fri, 04 Apr 2014 05:43:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WW0ei-0007kv-QL for qemu-devel@nongnu.org; Fri, 04 Apr 2014 05:43:29 -0400 From: Juan Quintela In-Reply-To: <1396543778-22307-13-git-send-email-mst@redhat.com> (Michael S. Tsirkin's message of "Thu, 3 Apr 2014 19:51:42 +0300") References: <1396543778-22307-1-git-send-email-mst@redhat.com> <1396543778-22307-13-git-send-email-mst@redhat.com> Date: Fri, 04 Apr 2014 11:43:16 +0200 Message-ID: <87ppkx8m6j.fsf@elfo.mitica> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v5 12/24] vmstate: fix buffer overflow in target-arm/machine.c Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Peter Maydell , qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, qemu-stable@nongnu.org, Alexey Kardashevskiy , Anthony Liguori , Amit Shah , dgilbert@redhat.com "Michael S. Tsirkin" wrote: > CVE-2013-4531 > > cpreg_vmstate_indexes is a VARRAY_INT32. A negative value for > cpreg_vmstate_array_len will cause a buffer overflow. > > VMSTATE_INT32_LE was supposed to protect against this > but doesn't because it doesn't validate that input is > non-negative. > > Fix this macro to valide the value appropriately. > > The only other user of VMSTATE_INT32_LE doesn't > ever use negative numbers so it doesn't care. > > Reported-by: Anthony Liguori > Signed-off-by: Michael S. Tsirkin Reviewed-by: Juan Quintela Integrated.