Bug 1671904 (CVE-2019-7221)

Summary: CVE-2019-7221 Kernel: KVM: nVMX: use-after-free of the hrtimer for emulation of the preemption timer
Product: [Other] Security Response Reporter: Prasad Pandit <ppandit>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: acaringi, airlied, asavkov, bhu, blc, brdeoliv, bskeggs, dedgar, dhoward, dvlasenk, fhrbata, hdegoede, hkrzesin, hwkernel-mgr, iboverma, ichavero, itamar, jarodwilson, jeremy, jforbes, jglisse, jkacur, joe.lawrence, john.j5live, jonathan, josef, jpoimboe, jross, jstancek, jwboyer, kernel-maint, kernel-mgr, labbott, lgoncalv, linville, matt, mchehab, mcressma, mjg59, mlangsdo, nmurray, pbonzini, plougher, rt-maint, rvrbovsk, security-response-team, steved, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A use-after-free vulnerability was found in the way the Linux kernel's KVM hypervisor emulates a preemption timer for L2 guests when nested (=1) virtualization is enabled. This high resolution timer(hrtimer) runs when a L2 guest is active. After VM exit, the sync_vmcs12() timer object is stopped. The use-after-free occurs if the timer object is freed before calling sync_vmcs12() routine. A guest user/process could use this flaw to crash the host kernel resulting in a denial of service or, potentially, gain privileged access to a system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-10 10:47:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1671905, 1671906, 1671907, 1671908, 1673676, 1673841, 1673842, 1717815, 1740272, 1740273, 1740274, 1740275    
Bug Blocks: 1671898    

Description Prasad Pandit 2019-02-02 05:20:00 UTC
A use after free issue was found in the way Linux kernel's KVM hypervisor
emulates a preemption timer for L2 guest when nested(=1) virtualization
is enabled. This high resolution timer(hrtimer) runs when L2 guest is active.
After VM exit, in sync_vmcs12() timer object is stopped. The use-after-free
occurs if the timer object is free'd before calling sync_vmcs12() routine.

A guest user/process could use this flaw to crash the host kernel resulting
in DoS OR potentially gain privileged access to a system.

It affects only Intel processors and only when nested virtualization is
enabled.

Upstream patch:
---------------
  -> https://git.kernel.org/linus/ecec76885bcfe3294685dc363fd1273df0d5d65f

Reference:
----------
  -> https://www.openwall.com/lists/oss-security/2019/02/18/2

Comment 2 Prasad Pandit 2019-02-06 07:10:33 UTC
Acknowledgments:

Name: Felix Wilhelm (Google)

Comment 3 Prasad Pandit 2019-02-07 11:24:21 UTC
Statement:

This issue does not affect the version of the kernel package as shipped with Red Hat Enterprise Linux 5, 6 and Red Hat Enterprise MRG 2.

This issue affects the versions of Linux kernel as shipped with Red Hat Enterprise Linux 7. Future kernel updates for Red Hat Enterprise Linux 7 may address this issue.

Note: Impact on Red Hat Enterprise Linux 7 kernel is limited, as it requires that nested virtualization feature is enabled on a system. Nested Virtualization feature is available only as - Technology Preview.

Comment 4 Prasad Pandit 2019-02-07 18:37:12 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1673676]

Comment 6 errata-xmlrpc 2019-04-23 12:57:53 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2019:0833 https://access.redhat.com/errata/RHSA-2019:0833

Comment 7 errata-xmlrpc 2019-04-23 14:28:38 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2019:0818 https://access.redhat.com/errata/RHSA-2019:0818

Comment 14 errata-xmlrpc 2019-11-26 11:52:30 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.5 Extended Update Support

Via RHSA-2019:3967 https://access.redhat.com/errata/RHSA-2019:3967

Comment 15 errata-xmlrpc 2019-12-03 08:25:53 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.4 Advanced Update Support
  Red Hat Enterprise Linux 7.4 Update Services for SAP Solutions
  Red Hat Enterprise Linux 7.4 Telco Extended Update Support

Via RHSA-2019:4058 https://access.redhat.com/errata/RHSA-2019:4058