From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSuEY-0000yB-JR for qemu-devel@nongnu.org; Wed, 26 Mar 2014 16:15:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WSuES-0004pe-83 for qemu-devel@nongnu.org; Wed, 26 Mar 2014 16:15:34 -0400 Message-ID: <5333355A.8080205@redhat.com> Date: Wed, 26 Mar 2014 21:15:22 +0100 From: Max Reitz MIME-Version: 1.0 References: <1395835569-21193-1-git-send-email-stefanha@redhat.com> <1395835569-21193-15-git-send-email-stefanha@redhat.com> In-Reply-To: <1395835569-21193-15-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-2.0 14/47] vpc/vhd: add bounds check for max_table_entries and block_size (CVE-2014-0144) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Kevin Wolf , Jeff Cody , pmatouse@redhat.com, qemu-stable@nongnu.org On 26.03.2014 13:05, Stefan Hajnoczi wrote: > From: Jeff Cody > > This adds checks to make sure that max_table_entries and block_size > are in sane ranges. Memory is allocated based on max_table_entries, > and block_size is used to calculate indices into that allocated > memory, so if these values are incorrect that can lead to potential > unbounded memory allocation, or invalid memory accesses. > > Also, the allocation of the pagetable is changed from g_malloc0() > to qemu_blockalign(). > > Signed-off-by: Jeff Cody > Signed-off-by: Kevin Wolf > --- > block/vpc.c | 27 +++++++++++++++++++++++---- > 1 file changed, 23 insertions(+), 4 deletions(-) Reviewed-by: Max Reitz