Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2714966imj; Mon, 11 Feb 2019 07:24:15 -0800 (PST) X-Google-Smtp-Source: AHgI3Iay0R0vt0giXdYlW9KkC/++MZ3al5xUPjyUD99+844Txilh224jde6fuoNOat9bKMmRL073 X-Received: by 2002:a62:6303:: with SMTP id x3mr38158453pfb.110.1549898655632; Mon, 11 Feb 2019 07:24:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549898655; cv=none; d=google.com; s=arc-20160816; b=L5SJxqbqQrB5dIMaJu+YaVBIfo6fI756Fm2HyaENZnL1xjijbrI0661VCuH/i22sp2 M6ulHCrs+HEBaC9gWYrkWbh7MH3kVjwF1UWmbwKnsCh6Myd5W6XchciN5rDYiNtfyr01 LqyWXinCSW25EfvEcFir+HjsuIzjlRLd/MxBdWyi4ZtBU5rYn+5KoY2WgaVDuPqbbK4h ZqZQuMH1a5si7Oc/y6abhZyvMdDjkbuy6nVXdt7fGcu5dEjnq/kCqegHNyYUYI7Cbery Pj9jLwxCadxJUayPnONeXsw2VN6t0sYtIVrbSPUqENNALUAW0QJaH4YuT2X12LPF+/Kk liBw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=b2upVaWZ9yPxZwii0a0eLYH9tMXy0tUu/i4sK9Gb+LA=; b=LoRu6sgNM2Go2KQ4RSWa1bKovAreEAl5pIMH/PQh5MiABiKbtJweAXJkTRKZ6dHrGH 2oGObk4r2BquLh1DZXpoE6JdiJuLCwuR5cgwfATjS6KqS/3rA6C4SswUdFQ9GZao7yiJ QziA06azGSjO1b3qpnOq4Js+cR9ah4brvGYTKRUD0Zvd0CPoLaMBXsmeginYtmvcBSfO M7gAEKvPClxgFaWooeRKSnkGeHkK0FzW4+U0ETKR+5z4o/PSB4mMLS5kzCF55jwsvdzJ 9F2HhBpm+QHJY57i/gktpq7dAHQ7bQ1eXjBfEvx8hqoX1Ku0X++EM+uUOgmTrVc8CX0x 1//g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oMfDNjnS; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si5101867pld.233.2019.02.11.07.23.59; Mon, 11 Feb 2019 07:24:15 -0800 (PST) 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=@kernel.org header.s=default header.b=oMfDNjnS; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390638AbfBKPDd (ORCPT + 99 others); Mon, 11 Feb 2019 10:03:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:52064 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390604AbfBKPDa (ORCPT ); Mon, 11 Feb 2019 10:03:30 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8C84C222AF; Mon, 11 Feb 2019 15:03:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549897410; bh=FhoaBL/cpQ1pqM6roGfID7I7UfWb9nY/sa4bWOM+GsI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oMfDNjnSUhCBRs6y7qFKhVm7YM6bBA0vGhxUK/G/fRKm5v60G49Rh/srWQvQHYtSF G8tcDqoTAI7XhVpRmwpPCujAR6GqR7w6QLrEgj24to8ibc6z1JJCVhOI9JF5qGeDdW 5Qm/2wcEGdS3zCieFUxZ8wJRxqobHomHfhIcApII= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peter Shier , Jim Mattson , Felix Wilhelm , stable@kernel.org, Paolo Bonzini Subject: [PATCH 4.14 194/205] KVM: nVMX: unconditionally cancel preemption timer in free_nested (CVE-2019-7221) Date: Mon, 11 Feb 2019 15:19:52 +0100 Message-Id: <20190211141841.102106498@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141827.214852402@linuxfoundation.org> References: <20190211141827.214852402@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Peter Shier commit ecec76885bcfe3294685dc363fd1273df0d5d65f upstream. Bugzilla: 1671904 There are multiple code paths where an hrtimer may have been started to emulate an L1 VMX preemption timer that can result in a call to free_nested without an intervening L2 exit where the hrtimer is normally cancelled. Unconditionally cancel in free_nested to cover all cases. Embargoed until Feb 7th 2019. Signed-off-by: Peter Shier Reported-by: Jim Mattson Reviewed-by: Jim Mattson Reported-by: Felix Wilhelm Cc: stable@kernel.org Message-Id: <20181011184646.154065-1-pshier@google.com> Signed-off-by: Paolo Bonzini Signed-off-by: Greg Kroah-Hartman --- arch/x86/kvm/vmx.c | 1 + 1 file changed, 1 insertion(+) --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -7708,6 +7708,7 @@ static void free_nested(struct vcpu_vmx if (!vmx->nested.vmxon) return; + hrtimer_cancel(&vmx->nested.preemption_timer); vmx->nested.vmxon = false; free_vpid(vmx->nested.vpid02); vmx->nested.posted_intr_nv = -1;