Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp370886ybb; Wed, 8 Apr 2020 01:15:00 -0700 (PDT) X-Google-Smtp-Source: APiQypK4BBaWe8WGgq/g9W4trTpea8G+9Laes4kMYNVT0ZeYHTGCt6Lr/TG/nWRCDFaQF2NoIYj+ X-Received: by 2002:a9d:77cf:: with SMTP id w15mr4830729otl.158.1586333700006; Wed, 08 Apr 2020 01:15:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586333700; cv=none; d=google.com; s=arc-20160816; b=c08E2rMHSdX2+eIjG2xCCv0Tv1dxzM3uM2ySRzVyM9CXSmuS3mgAFLBykvlyir6Kct K1U2p1rEsxO04wZ279+/YFkMxa5yR0G+u7bS9MhUdL+8Zw5rBYmxoXHe36NjYuOJL+er X104dmj9/sWcwVFe8F6YzDezxnm6aVhSrpmqTJnQuk8ZL5QujxzQbsVs8Z2A3pFpx80P TXsTMAzwvTLBE5oOduBDeu3WtqvOwvtYhdXlKrSLu41BfIyoEkW+pPNHPojvKiR5QE9a vrnHmZ58tLj+5uAA47sUVS+eL2KyBu2JQbSaSd2v0BejDABtCHfiOckCPVhOWu/WAyPZ IZUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=ku+EAOPg4vOvWbFqhNdMl4JM7x36akNpLyA8tGgpuD8=; b=ESgm7Kc6/jiiYrs+E3dTmwqOM3SLqi651G3uDvPSr79mtbAqlpQHKEGV3bSTr2efs6 yr3K/ljQxYOYRP4gCnIS6yGg/kIBSAiUrEEJ4RLwCn+cLu21NkoTKbcmER9tJv0D2NWf 3nd0Qhb7eWUK37Mq8z9mgcNsKAxcdxtBTByA+8iugGFPCdDUOk/Ew9b7Svfa6+icY+p+ 4Pf608VIW5+mgTJnnQaS0bBEYIF9QbNX6MexhkCx2GHDNTZnCT2b0EOFDzOcvYzB2A1V wopOng1gQeVeCAjJNqzk2/ufSNTumNqbQa/YR2j6Cfz8r47f3ETrqKNXs11jny69jy4X FgUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cgizoBWp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s24si2266033otp.251.2020.04.08.01.14.45; Wed, 08 Apr 2020 01:14:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cgizoBWp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726829AbgDHIK0 (ORCPT + 99 others); Wed, 8 Apr 2020 04:10:26 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:55588 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726525AbgDHIKZ (ORCPT ); Wed, 8 Apr 2020 04:10:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586333424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ku+EAOPg4vOvWbFqhNdMl4JM7x36akNpLyA8tGgpuD8=; b=cgizoBWpFXq7W5BaecTgHiSdYNcu0TVdhK8ec/+4YnVMk6bDvyUBYLm6EcQh9Bh+4xONEx mtyYt54opvHlw0DhILXIcaaN81WZTWBUKotMwf/Oi4HKMWH0+47YFKtELcNcTK9NpUWKPo ObyFQMVLmXufCFcvGkGaP+xGvN1k2F4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-410-raFHZzh3O6iyC_Fqr9rXIQ-1; Wed, 08 Apr 2020 04:10:20 -0400 X-MC-Unique: raFHZzh3O6iyC_Fqr9rXIQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 817BADB69; Wed, 8 Apr 2020 08:10:19 +0000 (UTC) Received: from gondolin (ovpn-113-103.ams2.redhat.com [10.36.113.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id 870E55E010; Wed, 8 Apr 2020 08:10:07 +0000 (UTC) Date: Wed, 8 Apr 2020 10:10:04 +0200 From: Cornelia Huck To: Christian Borntraeger Cc: Sean Christopherson , Janosch Frank , Paolo Bonzini , David Hildenbrand , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, syzbot+d889b59b2bb87d4047a2@syzkaller.appspotmail.com Subject: Re: [PATCH 0/2] KVM: Fix out-of-bounds memslot access Message-ID: <20200408101004.09b1f56d.cohuck@redhat.com> In-Reply-To: <526247ac-4201-8b3d-0f15-d93b12a530b8@de.ibm.com> References: <20200408064059.8957-1-sean.j.christopherson@intel.com> <526247ac-4201-8b3d-0f15-d93b12a530b8@de.ibm.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 8 Apr 2020 09:24:27 +0200 Christian Borntraeger wrote: > On 08.04.20 08:40, Sean Christopherson wrote: > > Two fixes for what are effectively the same bug. The binary search used > > for memslot lookup doesn't check the resolved index and can access memory > > beyond the end of the memslot array. > > > > I split the s390 specific change to a separate patch because it's subtly > > different, and to simplify backporting. The KVM wide fix can be applied > > to stable trees as is, but AFAICT the s390 change would need to be paired > > with the !used_slots check from commit 774a964ef56 ("KVM: Fix out of range > > I cannot find the commit id 774a964ef56 > It's 0774a964ef561b7170d8d1b1bfe6f88002b6d219 in my tree.