AMD Zen 1/Zen+ PSP bootrom exploit
Researchers have discovered a critical vulnerability in the Platform Security Processor (PSP) bootrom affecting AMD's Zen 1 and Zen+ CPUs, allowing persistent code execution with full system privileges.
The vulnerability resides in the PSP bootrom and allows attackers to bypass the processor's firmware verification during system initialization. This grants persistent code execution on the PSP, which has unrestricted access to all system components including memory, storage, and other processors. The exploit works by manipulating how the bootrom loads and verifies firmware modules, specifically exploiting modules with size_signed equal to zero.
The PSP is the first component to initialize on AMD machines and executes code from an immutable on-chip bootrom. It cryptographically verifies and executes a bootloader from the system firmware/BIOS storage. All code running on the PSP must be signed by AMD's public key, but this vulnerability circumvents that protection.
Technical Details
The exploit leverages a specific condition where the bootrom attempts to load the main bootloader (type 1) first. If signature verification fails, it attempts to load the recovery bootloader (type 3) without erasing the main bootloader's data from memory. By replacing the recovery bootloader with a specially crafted module that has size_signed equal to zero, attackers can bypass signature checks while their modified code remains in memory.
This technique allows the execution of unsigned code with full system privileges early in the boot process. The vulnerability is particularly dangerous because the PSP's activities are invisible to the operating system and other system components, making any malicious activity extremely difficult to detect.
Affected Hardware
Researchers have confirmed the vulnerability affects AMD's Zen 1 and Zen+ processor generations, including the Ryzen 5 1600X and Ryzen 7 2700X. Zen 2 and later processors are not affected, as researchers couldn't find modules with size_signed equal to zero in these generations. The vulnerability likely also affects Zen 1 EPYC processors, based on CTS labs' previous findings about the original Masterkey vulnerability.
The exploit requires no physical access to the target system, as the BIOS SPI flash can be written to from software. This means remote attackers could potentially exploit the vulnerability if they can gain initial access to a system and modify its firmware.
Historical Context
This vulnerability is a variant of the Masterkey (CVE-2018-8930) vulnerabilities discovered by CTS labs in 2018. The original Masterkey flaws allowed similar persistent code execution on the PSP through BIOS manipulation. AMD acknowledged the original vulnerabilities and indicated they would be fixed with BIOS updates, though specific details about which versions patched the issues remain unclear.
Researchers successfully exploited the original Masterkey in 2024 on an old BIOS version using information from a BlueHat IL 2019 presentation. This was possible because desktop machines typically lack rollback protection for BIOS, allowing attackers to flash vulnerable versions onto target systems.
Implications
The critical severity of this vulnerability stems from the PSP's complete system access and its invisibility to other components. Attackers could use this exploit to install persistent malware with root-like privileges that would be extremely difficult to detect or remove. The vulnerability could be particularly dangerous in enterprise environments, data centers, or systems handling sensitive information.
AMD has not yet released an official statement or security advisory regarding this new vulnerability. Users of Zen 1 and Zen+ systems should monitor for BIOS updates from their motherboard manufacturers that might address this issue. The proof of concept code provided by researchers targets specific firmware versions but could potentially be adapted to affect other configurations.