'You can now jailbreak your AMD CPU' — Google researchers release kit to exploit microcode vulnerability in Ryzen Zen 1 to Zen 4 chips

Ryzen CPU with 3D V-Cache
(Image credit: AMD)

A team of Google researchers working with AMD recently discovered a major CPU exploit on Zen-based processors. The exploit allows anyone with local admin privileges to write and push custom microcode updates to affected CPUs. The same Google team has released the full deep-dive on the exploit, including how to write your own microcode. Anyone can now effectively jailbreak their own AMD CPUs.

The exploit affects all AMD CPUs using the Zen 1 to Zen 4 architectures. AMD released a BIOS patch plugging the exploit shortly after its discovery, but any of the above CPUs with a BIOS patch before 2024-12-17 will be vulnerable to the exploit. Though a malicious actor wishing to abuse this vulnerability needs an extremely high level of access to a system to exploit it, those concerned should update their or their organization's systems to the most recent BIOS update.

The vulnerability is based on microcode, the low-level instructions determining how a CPU performs calculations. AMD and Intel have built their own custom RISC instruction sets (similar to alternative ISAs like RISC-V and ARM), which then internally contribute to a complex instruction set; in AMD and Intel's case, x86. Both companies create their custom microcode specifically for their CPU architectures and have built-in systems to push microcode updates at runtime if a vulnerability is found later. The alternative would be hard-locking the microcode at fabrication, redesigning chips from the ground up, and issuing recalls if severe enough vulnerabilities were discovered.

The AMD vulnerability, named "EntrySign", allows users to send custom microcode to any Zen 1 to Zen 4 CPU, changing how the processor runs and allowing users to do anything from accessing internal CPU buffers, strengthen or weaken security for VMs, and more. When the bug was first revealed, AMD's bulletin focused on EPYC server-grade CPUs and how bad actors could make secure links to remote client PCs accessing a larger server lose their SEV-based protection. Now, it is clear that the microcode exploit spreads to many more CPUs than just EPYC and that the possibilities expand far beyond simply making a secure link unsecured. Google engineer Tavis Ormandy bullishly declares that the vulnerability allows anyone to "jailbreak your AMD CPU" in an X post sharing his technical breakdown.

Microcode updates are double-checked against a series of strings and keys, signed by AMD, and confirmed against a hard-coded public key into the CPU itself. The EntrySign exploit works because AMD uses the AES-CMAC function (a message authentication code) as a cryptographic hash function. CMAC being used in this out-of-spec manner allowed Google's researchers to reverse engineer the security keys, preventing end users from pushing their unsigned microcode updates to the CPU (helped in no small part by AMD reusing a publicly-accessible NIST example key as its security key).

Google's Bughunters security team published a full technical outline of the vulnerability and the path they took to exploit it on Google's blog. Those with an unpatched AMD CPU from Zen 1 to Zen 4 can use Google's toolkit to jailbreak the processor themselves and share their findings and use cases with the research team. Luckily, microcode updates do not persist through reboots, so the experiments are largely harmless.

Edit: 3/7/2025: Clarified that microcode does not persist through reboots.

Dallin Grimm
Contributing Writer

Dallin Grimm is a contributing writer for Tom's Hardware. He has been building and breaking computers since 2017, serving as the resident youngster at Tom's. From APUs to RGB, Dallin has a handle on all the latest tech news. 

  • bit_user
    Well, that sounds fun! Anyone interested in helping reverse-engineer Zen's microcode should read their blog and follow the links.

    At the end of the post, they share this inspirational tidbit:
    "Previous research on Intel microcode has demonstrated the ability to craft new instructions to implement security features similar to ARM’s pointer authentication codes, accessing internal CPU buffers, tracing microcode, and more."
    Even just understanding the instruction set of the micro ops should give a much deeper insight into how these CPUs actually work.
    Reply
  • -Fran-
    "Haha, I'm in danger!"

    Regards :P
    Reply
  • thunderbolt17
    To be honest this is an absolute disaster of an exploit, and the amused headline really doesn't reflect how bad it is. This has to be one of the worst secure vulnerabilities ever found on AMD or Intel CPU's.
    Reply
  • ezst036
    Lenovo locks their AMD CPUs I think. I suspect people might try simply reversing that lock, moreso than random payload deliveries to unknown ebay buyers.
    Reply
  • rluker5
    Am I the only one that has trouble keeping a Windows key active after a bios flash with a ftpm setup?
    If I had one of these chips and I was looking at keeping the vulnerability or keeping 15 bucks for a new key, and it wasn't my office PC I would be torn on whether it was worth it.
    Reply
  • silentdude56k
    This isn't as serious as the closing paragraph suggests. Microcode updates are not permanent; they're stored in a special microcode RAM that loses its contents just like system RAM does when it loses power.

    Microcode is first loaded from the microcode ROM burned in at time of manufacture, then updated by the BIOS if it has a newer version available, then finally updated by the OS if it has an even newer version than the BIOS does. A power cycle starts this process all over again.

    Quote from the "Future Work" section of the Bug Hunters breakdown:
    Luckily, the security impact was limited by the fact that attackers must first obtain host ring 0 access in order to attempt to install a microcode patch and that these patches do not persist through a power cycle.

    This means that, unlike randomly found USB flash drives, used Zen 1-4 CPUs are just as safe as new CPUs.
    Reply
  • thaddeusk
    thunderbolt17 said:
    To be honest this is an absolute disaster of an exploit, and the amused headline really doesn't reflect how bad it is. This has to be one of the worst secure vulnerabilities ever found on AMD or Intel CPU's.
    You have much bigger problems if somebody already has local admin access on your machine.
    Reply
  • thekingofALLmonkz
    silentdude56k said:
    This means that, unlike randomly found USB flash drives, used Zen 1-4 CPUs are just as safe as new CPUs.
    Firmware modified to patch microcode upon each boot?
    Reply
  • silentdude56k
    thekingofALLmonkz said:
    Firmware modified to patch microcode upon each boot?

    A malicious BIOS could absolutely push a malicious microcode update to a vulnerable CPU, but the BIOS is also persistent and can do whatever it wants to any code executed afterwards. It's already game over at that point.
    Reply
  • bit_user
    ezst036 said:
    Lenovo locks their AMD CPUs I think. I suspect people might try simply reversing that lock, moreso than random payload deliveries to unknown ebay buyers.
    According to the blog post, the microcode doesn't persist across reboots. There's a microcode ROM, that's either non-writable or at least not affected by this exploit, and a microcode RAM. This exploit only lets you modify the RAM, which means that if you don't hack the BIOS or the machine's software, it will no longer have the modified microcode after a reboot.

    Or read silentdude56k's post.
    Reply