search menu icon-carat-right cmu-wordmark

CERT Coordination Center

Multiple race conditions due to TOCTOU flaws in various UEFI Implementations

Vulnerability Note VU#434994

Original Release Date: 2022-11-08 | Last Revised: 2024-05-06

Overview

Multiple Unified Extensible Firmware Interface (UEFI) implementations are vulnerable to code execution in System Management Mode (SMM) by an attacker who gains administrative privileges on the local machine. An attacker can corrupt the memory using Direct Memory Access (DMA) timing attacks that can lead to code execution. These threats are collectively referred to as RingHopper attacks.

Description

The UEFI standard provides an open specification that defines a software interface between an operating system (OS) and the device hardware on the system. UEFI can interface directly with hardware below the OS using SMM, a high-privilege CPU mode. SMM operations are closely managed by the CPU using a dedicated portion of memory called the SMRAM. The SMM can only be entered through System Management Interrupt (SMI) Handlers using a communication buffer. SMI Handlers are essentially a system-call to access the CPU's SMRAM from its current operating mode, typically Protected Mode.

A race condition involving the access and validation of the SMRAM can be achieved using DMA timing attacks that rely on time-of-use (TOCTOU) conditions. An attacker can use well-timed probing to try and overwrite the contents of SMRAM with arbitrary data, leading to attacker code being executed with the same elevated-privileges available to the CPU (i.e., Ring -2 mode). The asynchronous nature of SMRAM access via DMA controllers enables the attacker to perform such unauthorized access and bypass the verifications normally provided by the SMI Handler API.

The Intel-VT and Intel VT-d technologies provide some protection against DMA attacks using Input-Output Memory Management Unit (IOMMU) to address DMA threats. Although IOMMU can protect from DMA hardware attacks, SMI Handlers vulnerable to RingHopper may still be abused. SMRAM verification involving validation of nested pointers adds even more complexity when analyzing how various SMI Handlers are used in UEFI.

Impact

An attacker with either local or remote administrative privileges can exploit DMA timing attacks to elevate privileges beyond the operating system and execute arbitrary code in SMM mode (Ring -2). These attacks can be invoked from the OS using vulnerable SMI Handlers. In some cases, the vulnerabilities can be triggered in the UEFI early boot phases (as well as sleep and recovery) before the operating system is fully initialized.

A successful attack enables any of the following impacts:

  • Invalidation or bypass of UEFI security features (SecureBoot, Intel BootGuard).
  • Installation of persistent software that cannot be easily detected or erased.
  • Creation of backdoors and back communications channels to exfiltrate sensitive data
  • Interruption of system execution leading to permanent shutdown.

Because these attacks are against UEFI supported firmware, OS and EDR solutions may have diminished visibility into unauthorized access.

Solution

Install the latest stable version of UEFI firmware provided by your PC vendor or by the reseller of your computing environments. See the links below for resources and updates provided by specific vendors to address these issues.

If your operating system supports automatic or managed updates for firmware, such as Linux Vendor Firmware Service (LVFS), check (fwupdmgr get-updates) and apply the firmware updates provided by LVFS using fwupdmgr update as appropriate.

Acknowledgements

Thanks to the Intel iStare researchers Jonathan Lusky and Benny Zeltser who discovered and reported this vulnerability.

This document was written by Vijay Sarvepalli and Jeffrey S. Havrilla.

Vendor Information

434994
 

American Megatrends Incorporated (AMI) Affected

Notified:  2022-01-10 Updated: 2022-11-10

Statement Date:   November 09, 2022

CVE-2021-33164 Affected

Vendor Statement

We have not received a statement from the vendor.

Dell Affected

Notified:  2022-01-10 Updated: 2023-01-25

Statement Date:   January 25, 2023

CVE-2021-33164 Affected

Vendor Statement

We have not received a statement from the vendor.

References

Fujitsu Europe Affected

Notified:  2022-09-14 Updated: 2024-05-06

Statement Date:   May 06, 2024

CVE-2021-33164 Affected

Vendor Statement

Fujitsu is aware of the vulnerabilities in Insyde firmware (InsydeH2O UEFI-BIOS) known as "RingHopper".

Fujitsu CCD (Client Computing Device) mobile devices are affected.

The Fujitsu PSIRT released FCCL-IS-2022-110801 on https://security.ts.fujitsu.com (Security Notices) accordingly.

In case of questions regarding this Fujitsu PSIRT Security Notice, please contact the Fujitsu PSIRT (Fujitsu-PSIRT@ts.fujitsu.com).

Hewlett Packard Enterprise Affected

Notified:  2022-01-10 Updated: 2022-11-10

Statement Date:   January 11, 2022

CVE-2021-33164 Affected

Vendor Statement

We have not received a statement from the vendor.

Insyde Software Corporation Affected

Notified:  2022-02-23 Updated: 2022-11-10

Statement Date:   November 09, 2022

CVE-2021-33164 Affected

Vendor Statement

Some versions of Insyde's InsydeH2O product are affected by this vulnerabililty. Insyde has released mitigations for these. Public information and further details can be found on Insyde security page https://www.insyde.com/security-pledge.

Intel Affected

Notified:  2022-01-10 Updated: 2022-11-08

Statement Date:   November 07, 2022

CVE-2021-33164 Affected

Vendor Statement

Intel is releasing a public security advisory pertaining to this issue - INTEL-SA-00752 on November 8, 2022 This advisory will be available here on that date - https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00752.html This issue has been assigned CVE-2021-33164

References

AMD Not Affected

Notified:  2022-01-26 Updated: 2022-11-08

Statement Date:   June 20, 2022

CVE-2021-33164 Not Affected

Vendor Statement

We have not received a statement from the vendor.

Phoenix Technologies Not Affected

Notified:  2022-01-10 Updated: 2022-11-08

Statement Date:   March 24, 2022

CVE-2021-33164 Not Affected

Vendor Statement

We have reviewed our code and do NOT believe we are affected by this vulnerability.

Toshiba Corporation Not Affected

Notified:  2022-01-10 Updated: 2022-11-08

Statement Date:   January 20, 2022

CVE-2021-33164 Not Affected

Vendor Statement

We have not received a statement from the vendor.

Acer Unknown

Notified:  2022-01-10 Updated: 2022-11-08

CVE-2021-33164 Unknown

Vendor Statement

We have not received a statement from the vendor.

Amazon Unknown

Notified:  2022-08-22 Updated: 2022-11-08

CVE-2021-33164 Unknown

Vendor Statement

We have not received a statement from the vendor.

ASUSTeK Computer Inc. Unknown

Notified:  2022-01-10 Updated: 2022-11-08

CVE-2021-33164 Unknown

Vendor Statement

We have not received a statement from the vendor.

Gamma Tech Computer Corp. Unknown

Notified:  2022-01-10 Updated: 2022-11-08

CVE-2021-33164 Unknown

Vendor Statement

We have not received a statement from the vendor.

GETAC Inc. Unknown

Notified:  2022-01-10 Updated: 2022-11-08

CVE-2021-33164 Unknown

Vendor Statement

We have not received a statement from the vendor.

GIGABYTE Unknown

Notified:  2022-01-19 Updated: 2022-11-08

CVE-2021-33164 Unknown

Vendor Statement

We have not received a statement from the vendor.

Google Unknown

Notified:  2022-08-22 Updated: 2022-11-08

CVE-2021-33164 Unknown

Vendor Statement

We have not received a statement from the vendor.

HP Inc. Unknown

Notified:  2022-01-10 Updated: 2022-11-08

CVE-2021-33164 Unknown

Vendor Statement

We have not received a statement from the vendor.

JPCERT/CC Vulnerability Handling Team Unknown

Notified:  2022-02-18 Updated: 2022-11-08

CVE-2021-33164 Unknown

Vendor Statement

We have not received a statement from the vendor.

Lenovo Unknown

Notified:  2022-01-10 Updated: 2022-11-08

CVE-2021-33164 Unknown

Vendor Statement

We have not received a statement from the vendor.

Microsoft Unknown

Notified:  2022-01-10 Updated: 2022-11-08

Statement Date:   June 21, 2022

CVE-2021-33164 Unknown

Vendor Statement

We have not received a statement from the vendor.

MSI - Micro-Star International Ltd Unknown

Notified:  2022-01-19 Updated: 2022-11-08

CVE-2021-33164 Unknown

Vendor Statement

We have not received a statement from the vendor.

NEC Corporation Unknown

Notified:  2022-02-09 Updated: 2022-11-08

CVE-2021-33164 Unknown

Vendor Statement

We have not received a statement from the vendor.

ReactOS Unknown

Notified:  2022-01-10 Updated: 2022-11-08

CVE-2021-33164 Unknown

Vendor Statement

We have not received a statement from the vendor.

Star Labs Online Limited Unknown

Notified:  2022-01-10 Updated: 2022-11-08

CVE-2021-33164 Unknown

Vendor Statement

We have not received a statement from the vendor.

VAIO Corporation Unknown

Notified:  2022-01-10 Updated: 2022-11-08

CVE-2021-33164 Unknown

Vendor Statement

We have not received a statement from the vendor.

VMware Unknown

Notified:  2022-08-22 Updated: 2022-11-08

CVE-2021-33164 Unknown

Vendor Statement

We have not received a statement from the vendor.

View all 26 vendors View less vendors


Other Information

CVE IDs: CVE-2021-33164
API URL: VINCE JSON | CSAF
Date Public: 2022-11-08
Date First Published: 2022-11-08
Date Last Updated: 2024-05-06 18:18 UTC
Document Revision: 8

Sponsored by CISA.