From: Alexander Graf Subject: Re: [PATCHv2] kvm-s390: fix potential array overrun in intercept handling Date: Fri, 22 Jan 2010 00:15:18 +0100 Message-ID: <28FA3281-AD76-4CCE-8F86-75E28F0CDC7F@suse.de> References: <201001211156.03669.borntraeger@de.ibm.com> <4B5833C3.8070908@redhat.com> <201001211219.07628.borntraeger@de.ibm.com> <20100121173656.GF3750@amt.cnet> Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Christian Borntraeger , Avi Kivity , kvm@vger.kernel.org, Martin Schwidefsky , Heiko Carstens , cotte@de.ibm.com To: Marcelo Tosatti Return-path: Received: from cantor.suse.de ([195.135.220.2]:40133 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755469Ab0AUXPV (ORCPT ); Thu, 21 Jan 2010 18:15:21 -0500 In-Reply-To: <20100121173656.GF3750@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On 21.01.2010, at 18:36, Marcelo Tosatti wrote: > On Thu, Jan 21, 2010 at 12:19:07PM +0100, Christian Borntraeger wrote: >> v2: apply Avis suggestions about ARRAY_SIZE. >> >> kvm_handle_sie_intercept uses a jump table to get the intercept handler >> for a SIE intercept. Static code analysis revealed a potential problem: >> the intercept_funcs jump table was defined to contain (0x48 >> 2) entries, >> but we only checked for code > 0x48 which would cause an off-by-one >> array overflow if code == 0x48. >> >> Use the compiler and ARRAY_SIZE to automatically set the limits. >> >> Signed-off-by: Christian Borntraeger > > Applied and queued for .33, CC: stable, thanks. Yes. Christian, please get this into 2.6.32-stable. Alex