Matteo Rizzo, Kristoffer `spq` Janke, Josh Eads and Eduardo Vela Nava

EntrySign: create your own x86 microcode for fun and profit

Abstract

Microcode is a fundamental building block for x86 CPUs – implementing everything from complex x86 instructions, to privilege transitions and virtualization. Beyond ring 0 and SMM lies the microcode privilege level, with maximum control over the x86 core and the internal buffers within. Accessing and tinkering with microcode is a hacker’s dream, but cryptographic protections prevent all but Intel and AMD from doing so. Previous work has demonstrated methods to bypass microcode patch authentication on the Intel Atom and reverse engineer the microcode ISA enough to write sophisticated custom microcode patches (Intel Atom Goldmont and AMD K8/10). However, easily accessible arbitrary microcode execution was unavailable on modern high-performance CPUs until now.

In this talk we present the full details about EntrySign, a cryptographic flaw in AMD’s microcode patch verification logic, including how we discovered the bug and how you can extend our results. EntrySign lets us execute arbitrary microcode on all AMD CPUs from Zen to Zen 4 and modify the behavior of x86 instructions. We will delve into the format of AMD microcode, how their patches are verified, how we were able to reverse engineer this process, and how we were able to access the key information required to defeat it. Finally, we are releasing all of the tools necessary to reproduce our work and continue building upon our research – including a short demo showing how to write and install your own microcode patch.

BIO

Matteo Rizzo is a security engineer at Google Zürich with an interest in low-level exploits, currently working on CPU exploits and the Linux kernel. He also plays CTF with polygl0ts and organizers.

Kristoffer `spq` Janke is a security engineer at Google

Josh Eads is a security engineer at Google on the Cloud Vulnerability Research team. His recent work has focused around virtualization, hardware offload, and CPU security research.

Eduardo Vela plays a key role in Google’s ongoing battle against vulnerabilities. Working with teams across the company, he helps ensure that flaws in Google products are addressed and that responsible disclosure practices extend throughout the industry. He was one of the pioneers of Google’s bug bounty program and has led it for over a decade, shaping the landscape for ethical security research. Currently he analyzes Linux kernel and CPU exploits to identify and understand fundamental weaknesses. His work aims to strengthen the technological foundation upon which we all rely, enabling a future where everyone can use technology safely.