From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [Patch v2 3/3] xen/gdbsx: Security audit of {, un}pausevcpu and domstatus hypercalls Date: Thu, 24 Jul 2014 14:02:43 +0100 Message-ID: <53D103F3.2010604@citrix.com> References: <20140724110746.GC1821@deinos.phlegethon.org> <1406200565-21913-1-git-send-email-andrew.cooper3@citrix.com> <53D11F0002000078000258A4@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53D11F0002000078000258A4@mail.emea.novell.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: Jan Beulich Cc: Keir Fraser , Ian Campbell , Ian Jackson , Tim Deegan , Xen-devel List-Id: xen-devel@lists.xenproject.org On 24/07/14 13:58, Jan Beulich wrote: >>>> On 24.07.14 at 13:16, wrote: >> --- a/xen/arch/x86/domctl.c >> +++ b/xen/arch/x86/domctl.c >> @@ -1030,11 +1030,10 @@ long arch_do_domctl( >> if ( !d->controller_pause_count ) >> break; >> ret = -EINVAL; >> - if ( domctl->u.gdbsx_pauseunp_vcpu.vcpu >= MAX_VIRT_CPUS || >> + if ( domctl->u.gdbsx_pauseunp_vcpu.vcpu >= d->max_vcpus || > As mentioned on IRC - are you sure you can replace (rather than > amend) the previous bounds check? I.e. do you _know_ that gdbsx > can deal with guests having more than MAX_VIRT_CPUS vCPU-s? > > Jan > I have no idea whether it can or not, but if it asks for a legitimate ID greater than MAX_VIRT_CPUS, then I think it is reasonable to assume yes. ~Andrew