CVE Vulnerabilities

CVE-2021-29657

Time-of-check Time-of-use (TOCTOU) Race Condition

Published: Jul 22, 2021 | Modified: May 19, 2023
CVSS 3.x
7.4
HIGH
Source:
NVD
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
6.9 MEDIUM
AV:L/AC:M/Au:N/C:C/I:C/A:C
RedHat/V2
RedHat/V3
Ubuntu

arch/x86/kvm/svm/nested.c in the Linux kernel before 5.11.12 has a use-after-free in which an AMD KVM guest can bypass access control on host OS MSRs when there are nested guests, aka CID-a58d9166a756. This occurs because of a TOCTOU race condition associated with a VMCB12 double fetch in nested_svm_vmrun.

Weakness

The product checks the state of a resource before using that resource, but the resource’s state can change between the check and the use in a way that invalidates the results of the check. This can cause the product to perform invalid actions when the resource is in an unexpected state.

Affected Software

Name Vendor Start Version End Version
Linux_kernel Linux 5.10 (including) 5.10.28 (excluding)
Linux_kernel Linux 5.11 (including) 5.11.12 (excluding)

Potential Mitigations

References