Received: from eggs.gnu.org ([2001:4830:134:3::10]:34640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwzaq-0005Dt-VX for qemu-devel@nongnu.org; Tue, 17 Jun 2014 16:03:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wwzak-0005cX-R4 for qemu-devel@nongnu.org; Tue, 17 Jun 2014 16:02:56 -0400 Received: from s16892447.onlinehome-server.info ([82.165.15.123]:60671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wwzak-0005aG-KO for qemu-devel@nongnu.org; Tue, 17 Jun 2014 16:02:50 -0400 Message-ID: <53A09E32.3080905@ilande.co.uk> Date: Tue, 17 Jun 2014 20:59:46 +0100 From: Mark Cave-Ayland MIME-Version: 1.0 References: <1402323569-30927-1-git-send-email-sw@weilnetz.de> In-Reply-To: <1402323569-30927-1-git-send-email-sw@weilnetz.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] apb: Fix out-of-bounds array write access List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil , qemu-devel@nongnu.org Cc: Peter Maydell On 09/06/14 15:19, Stefan Weil wrote: > The array regs is declared with IOMMU_NREGS (3) elements and accessed > using IOMMU_CTRL (0) and IOMMU_BASE (8). In most cases, those values > are right shifted before being used as an index which results in indices > 0 and 1. In one case, this right shift was missing for IOMMU_BASE which > results in an out-of-bounds write access with index 8. > > The patch adds the missing shift operation also for IOMMU_CTRL where > it is needed only for cosmetic reasons. > > Signed-off-by: Stefan Weil BTW I forgot to add - do I need to send a further pull request for this or is it intended to go via trivial? ATB, Mark.