Has it been Pwned
Side channelPractical impact

GoFetch: Apple's data memory-dependent prefetcher breaks constant-time crypto

Boru Chen and colleagues showed that the data memory-dependent prefetcher (DMP) in Apple M1, M2 and M3 CPUs inspects the contents of memory and prefetches anything that looks like a pointer. An attacker feeding chosen inputs to constant-time code can make secret-dependent intermediate values look like pointers, observe the resulting prefetches via the cache, and extract keys from Go's RSA, OpenSSL's Diffie-Hellman, and Kyber and Dilithium implementations.

A separate source-review date has not been recorded for this historical entry. Corrections.

Broken implementation. The underlying math is not broken by this. The failure is in code, hardware, or how the primitive is used.

Background

Constant-time programming assumes that data values never influence memory addresses. A DMP violates that assumption in hardware: the value itself can trigger a memory access. GoFetch built on the 2022 discovery of Apple's DMP (Augury, Vicarte et al.) and showed it is exploitable against real cryptographic code from an unprivileged co-located process.

Mitigations: on M3, setting the DIT bit disables the DMP; on M1/M2 there is no user-controllable switch in macOS, so libraries must use input blinding or run crypto on efficiency cores. Intel's Raptor Lake DMP has stricter activation criteria and can be disabled with DOIT. This is a hardware-optimisation flaw, not a weakness in RSA, DH or lattice cryptography.

Sources

  1. paperGoFetch: Breaking Constant-Time Cryptographic Implementations Using Data Memory-Dependent Prefetchers (USENIX Security 2024)USENIX, usenix.org
  2. announcementGoFetch project pageGoFetch authors, gofetch.fail
  3. newsUnpatchable vulnerability in Apple chip leaks secret encryption keysArs Technica, arstechnica.com
  4. wikiGoFetchWikipedia, en.wikipedia.org