From: Ian Jackson Subject: Re: [PATCH 21/21] libxc: range checks in xc_dom_p2m_host and _guest Date: Fri, 7 Jun 2013 15:38:34 +0100 Message-ID: <20913.61546.335779.459821@mariner.uk.xensource.com> References: <1370544726-30459-1-git-send-email-ian.jackson@eu.citrix.com> <1370544726-30459-22-git-send-email-ian.jackson@eu.citrix.com> <51B1A0E9.4060705@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <51B1A0E9.4060705@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: "xen-devel@lists.xensource.com" , "mattjd@gmail.com" , "security@xen.org" List-Id: xen-devel@lists.xenproject.org Andrew Cooper writes ("Re: [PATCH 21/21] libxc: range checks in xc_dom_p2m_host and _guest"): > On 06/06/13 19:52, Ian Jackson wrote: > > + if (pfn >= dom->rambase_pfn + dom->total_pages) > > + return INVALID_MFN; > > Need to check whether pfn < dom->rambase_pfn otherwise you can just as > easily underflow the array. Duh, yes, thanks. Ian.