Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2727439imj; Mon, 11 Feb 2019 07:35:35 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ4MP67SpXIQZfSYsE6WrYnSoFq7DTesI9mFyZslfT3PPx5Fow5TPwuPe7PPVV73HUuUwIP X-Received: by 2002:a63:d54a:: with SMTP id v10mr34143468pgi.154.1549899334959; Mon, 11 Feb 2019 07:35:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549899334; cv=none; d=google.com; s=arc-20160816; b=fwNNxV14ugprOVKT0hwvMu6L2BMa7RsvvJvSrC09Og/DQpWRE7NQEmcXiFe2xbTrJO Bzw8twAqywq9kuquH4sVkqo7dqwGggUrApV0ZArLWE2gZnI4ILV3GPWvCQMYnCXn+czN +4vKHmrDtXpAt+YtiJPZJaOzdW0ha+Bw8o8SVawv4XrPe1C8KVvp2d3UvmNnfSB/6eyd dwJ05NGBz4v/8goaa8F7imhfdp3QNaOyCf6ehk9sF1KXc/arbgwns1i+FE9Pc54KNnDj uCShzkgoQVgR7eWsnqC8VeeP5Pw+eFRLlh4KjGmqHwpWXf6bUI/iNaFLahABKfPepN4x eogg== 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=TxEYdPjBCgVB9q4xqq1LhPr0DQLKsX6sEiFiNFcvoUQ=; b=HPINpyfqcIXTGBJgDyYkWAepIv4ACxgh0CvyDpitFe7BPmi/QFGmwcF3443NGSkxox ilcjyIWoBHE8YKztgpQEfWLjUAhQEenP8E5moXBp8GePxE0loZlRTNiN3YUCJF6usPWd +o8YkSo1vTOlG85F06jQw4ZxPbhNFlkBcsKZgxQK/fDLe32/k9FY1xiFw3gnLOgb5tv4 qHnEOjNjrJXzmNep2i0YQsU4qEOBdLqUo2uxLsBGwTepcx4lmeaF1MFs3dlQNtgwKjoH jqzKPGXC8tKHuTTATlIjRR8bfUSghkrxsRwOVGXFRyU3UFjT6Z22ypf6zYz9tn+LJgg6 P5dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=N9mtaMEs; 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 c1si9928607pls.326.2019.02.11.07.35.19; Mon, 11 Feb 2019 07:35:34 -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=N9mtaMEs; 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 S2388568AbfBKOxJ (ORCPT + 99 others); Mon, 11 Feb 2019 09:53:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:39510 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728075AbfBKOxH (ORCPT ); Mon, 11 Feb 2019 09:53:07 -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 A78C520844; Mon, 11 Feb 2019 14:53:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549896787; bh=LAXLaIDuFNyna3RLYEU4apQAQ6UxTwyqMJlkAlnUSa4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N9mtaMEsguwGSMU9WzdXSaLHKGgeNjlvNgg5atnk+FqSS5d7SoF/NhPvN7r/s2+qp nkx190Q0r94zB7SwVSkg7lqSnuo1RijKJoStd7K3zFcL8XBK2eTy2iyM3sEUZ1vW1v JLyQCEtjy6mZPR8J4C7eflPiEVxamVd5vYGP6D7k= 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.19 302/313] KVM: nVMX: unconditionally cancel preemption timer in free_nested (CVE-2019-7221) Date: Mon, 11 Feb 2019 15:19:42 +0100 Message-Id: <20190211141913.047459385@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141852.749630980@linuxfoundation.org> References: <20190211141852.749630980@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.19-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 @@ -8469,6 +8469,7 @@ static void free_nested(struct vcpu_vmx if (!vmx->nested.vmxon && !vmx->nested.smm.vmxon) return; + hrtimer_cancel(&vmx->nested.preemption_timer); vmx->nested.vmxon = false; vmx->nested.smm.vmxon = false; free_vpid(vmx->nested.vpid02);