Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2023-20540

CVE-2023-20540: AMD ASP Timing Discrepancy Vulnerability

CVE-2023-20540 is a timing discrepancy vulnerability in AMD's ASP that enables privileged attackers to brute-force hash message authentication codes. This article covers the technical details, affected systems, and mitigation.

Published:

CVE-2023-20540 Overview

CVE-2023-20540 describes an observable timing discrepancy in the AMD Secure Processor (ASP). The flaw allows a privileged local attacker to perform a brute-force attack against the hash message authentication code (HMAC) verification routine. Successful exploitation enables arbitrary message input to pass integrity checks, potentially leading to a loss of data integrity. The issue is categorized under [CWE-208] Observable Timing Discrepancy, a class of side-channel weakness where variable execution time leaks secret-dependent state. AMD documented this issue in AMD Security Bulletin SB-4012.

Critical Impact

A privileged local attacker can measure timing variations during HMAC comparison in the AMD Secure Processor to forge valid authentication codes, undermining data integrity guarantees enforced by the ASP.

Affected Products

  • AMD Secure Processor (ASP) firmware — refer to AMD Security Bulletin SB-4012 for the complete list of affected CPU families and platforms
  • AMD EPYC, Ryzen, and Athlon product lines using vulnerable ASP firmware revisions
  • Systems relying on the ASP for cryptographic integrity verification

Discovery Timeline

  • 2026-06-26 - CVE-2023-20540 published to NVD
  • 2026-06-26 - Last updated in NVD database

Technical Details for CVE-2023-20540

Vulnerability Analysis

The AMD Secure Processor is an ARM-based coprocessor embedded in AMD CPUs that provides a trusted execution environment. It enforces platform security functions including secure boot, firmware verification, and cryptographic key management. HMAC verification is used throughout the ASP to authenticate messages and firmware blobs.

The vulnerability stems from a non-constant-time comparison during HMAC validation. When the ASP compares a candidate HMAC against the expected value, execution time varies based on how many leading bytes match. An attacker with privileged local access can measure these timing differences across many attempts. By iteratively adjusting candidate bytes and observing latency, the attacker can recover the correct HMAC one byte at a time. This transforms an infeasible brute-force problem into a linear search.

The outcome is loss of integrity (VI:L) without direct confidentiality or availability impact. The attack requires high privileges and local access, which limits practical exposure but does not eliminate risk in multi-tenant or attested-boot scenarios.

Root Cause

The root cause is an HMAC comparison routine in ASP firmware that terminates early on the first mismatched byte. This produces a measurable timing side channel correlated with the secret verification value. Constant-time comparison primitives are required for any secret-dependent equality check.

Attack Vector

Exploitation requires local access with high privileges on the host system. The attacker submits crafted messages and precisely measures ASP response latency for each HMAC candidate. Over many iterations, byte-by-byte timing analysis reveals the valid tag, allowing arbitrary attacker-chosen messages to pass integrity verification. No verified public proof-of-concept code is available. See AMD Security Bulletin SB-4012 for vendor technical details.

Detection Methods for CVE-2023-20540

Indicators of Compromise

  • No public indicators of compromise have been published for CVE-2023-20540
  • Repeated high-frequency HMAC verification requests to the ASP from a single privileged process may indicate brute-force timing measurement
  • Unexpected privileged processes performing sustained cryptographic operations against platform security interfaces

Detection Strategies

  • Audit firmware version reporting on AMD systems and compare against fixed revisions listed in AMD SB-4012
  • Monitor privileged process activity that interacts with ASP driver interfaces such as /dev/sev on Linux or the corresponding Windows platform security devices
  • Baseline normal HMAC verification call frequency and alert on statistical anomalies indicating iterative probing

Monitoring Recommendations

  • Collect endpoint telemetry for local privilege escalation activity that would be a prerequisite for exploitation
  • Log firmware update events and validate ASP firmware version after patch deployment
  • Track administrator-level process creation on AMD-based servers and correlate with cryptographic subsystem access

How to Mitigate CVE-2023-20540

Immediate Actions Required

  • Apply the ASP firmware and AGESA updates provided by AMD and your system OEM as detailed in AMD Security Bulletin SB-4012
  • Restrict administrative and root access on AMD systems, since exploitation requires high local privileges
  • Inventory AMD CPU platforms and identify systems running pre-patch ASP firmware

Patch Information

AMD has released updated firmware to address the timing discrepancy in the ASP HMAC verification routine. Consult AMD Security Bulletin SB-4012 for the specific AGESA versions and platform-level BIOS updates required. OEMs distribute the fix as system BIOS or firmware updates; apply the latest release from your hardware vendor.

Workarounds

  • No software-only workaround eliminates the timing side channel — firmware update is required
  • Enforce least privilege to prevent unprivileged users from obtaining the administrative access required for exploitation
  • In sensitive workloads relying on attested boot or confidential compute, defer trust decisions until patched firmware is confirmed on all nodes
bash
# Verify AMD firmware and microcode version on Linux
cat /proc/cpuinfo | grep -E "model name|microcode" | head -4
dmesg | grep -i "ccp\|psp\|sev"

# On systems with fwupd, check for available firmware updates
sudo fwupdmgr refresh
sudo fwupdmgr get-updates
sudo fwupdmgr update

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.