Apple Silicon Vulnerability Allows Hackers to Extract Encryption Keys

An unpatchable vulnerability has been discovered in Apple's M-series chips that allows attackers to extract secret encryption keys from Macs under certain conditions, according to a newly published academic research paper (via ArsTechnica).

m1 vs m2 air feature toned down
Named "GoFetch," the type of cyber attack described involves Data Memory-Dependent Prefetchers (DMPs), which try to predict what data the computer will need next and retrieve it in advance. This is meant to make processing faster, but it can unintentionally reveal information about what the computer is doing.

The paper finds that DMPs, especially the ones in Apple's processors, pose a significant threat to the security provided by constant-time programming models, which are used to write programs so that they take the same amount of time to run, no matter what data they're dealing with.

The constant-time programming model is meant to protect against side-channel attacks, or types of attacks where someone can gain sensitive information from a computer system without directly accessing it (by observing certain patterns, for example). The idea is that if all operations take the same amount of time, there's less for an attacker to observe and exploit.

However, the paper finds that DMPs, particularly in Apple silicon, can leak information even if the program is designed not to reveal any patterns in how it accesses memory. The new research finds that the DMPs can sometimes confuse memory content, which causes it to treat the data as an address to perform memory access, which goes against the constant-time model.

The authors present GoFetch as a new type of attack that can exploit this vulnerability in DMPs to extract encryption keys from secure software. The attack works against some popular encryption algorithms that are thought to be resistant to side-channel attacks, including both traditional (e.g. OpenSSL Diffie-Hellman Key Exchange, Go RSA decryption) and post-quantum (e.g. CRYSTALS-Kyber and CRYSTALS-Dilithium) cryptographic methods.

In an email to ArsTechnica, the authors explained:

Prefetchers usually look at addresses of accessed data (ignoring values of accessed data) and try to guess future addresses that might be useful. The DMP is different in this sense as in addition to addresses it also uses the data values in order to make predictions (predict addresses to go to and prefetch). In particular, if a data value "looks like" a pointer, it will be treated as an "address" (where in fact it's actually not!) and the data from this "address" will be brought to the cache. The arrival of this address into the cache is visible, leaking over cache side channels.

Our attack exploits this fact. We cannot leak encryption keys directly, but what we can do is manipulate intermediate data inside the encryption algorithm to look like a pointer via a chosen input attack. The DMP then sees that the data value "looks like" an address, and brings the data from this "address" into the cache, which leaks the "address." We don't care about the data value being prefetched, but the fact that the intermediate data looked like an address is visible via a cache channel and is sufficient to reveal the secret key over time.

In summary, the paper shows that the DMP feature in Apple silicon CPUs could be used to bypass security measures in cryptography software that were thought to protect against such leaks, potentially allowing attackers to access sensitive information, such as a 2048-bit RSA key, in some cases in less than an hour.

According to the authors, the flaw in Apple's chips cannot be patched directly. Instead, the attack vector can only be reduced by building defenses into third-party cryptographic software that could result in an extreme performance degradation when executing the cryptographic operations, particularly on the earlier M1 and M2 chips. The DMP on the M3, Apple's latest chip, has a special bit that developers can invoke to disable it, but the researchers aren't yet sure what kind of penalty will occur when this performance optimization is turned off.

As ArsTechnica notes, this isn't the first time researchers have identified threats in Apple DMPs. Research documented in 2022 discovered one such threat in both the ‌M1‌ and Apple's A14 Bionic chip for iPhones, which resulted in the "Augury" attack. However, this attack was ultimately unable to extract the sensitive data when constant-time practices were used.

"GoFetch shows that the DMP is significantly more aggressive than previously thought and thus poses a much greater security risk," the researchers claim on their website. "Specifically, we find that any value loaded from memory is a candidate for being dereferenced (literally!). This allows us to sidestep many of Augury's limitations and demonstrate end-to-end attacks on real constant-time code."

DMP-style attacks are not common, and the researchers informed Apple of the vulnerability in December 2023. Users concerned about the vulnerability are advised to check for GoFetch mitigation updates that become available in future macOS updates for any of the encryption protocols known to be vulnerable. Apple representatives declined to comment on the record when ArsTechnica asked about the paper.

Popular Stories

iPhone 17 Pro Dual Tone Feature 1

iPhone 17 Pro Launching Later This Year With These 8 New Features

Thursday January 9, 2025 5:45 am PST by
While the iPhone 17 Pro and iPhone 17 Pro Max are not expected to launch until September, there are already plenty of rumors about the devices. iPhone 17 Pro concept based on rumors Below, we recap key changes rumored for the iPhone 17 Pro models as of January 2025: More aluminum: iPhone 17 Pro models are rumored to have an aluminum frame, whereas the iPhone 15 Pro and iPhone 16 Pro models ...
HomePod mini and Apple TV

New Apple TV and HomePod Mini Launching This Year With One Thing in Common

Wednesday January 8, 2025 6:18 am PST by
It was recently reported that new Apple TV and new HomePod mini models will launch this year, and the devices are expected to have one thing in common. Bloomberg's Mark Gurman last month reported that the new Apple TV and the new HomePod mini will be equipped with Apple's own combined Wi-Fi and Bluetooth chip. Gurman said the chip supports Wi-Fi 6E, so that could end up being a key upgrade...
iPhone SE 4 Thumb 1

New iPhone SE and iPad 11 Launch Timing Allegedly Revealed by Leaker

Tuesday January 7, 2025 11:12 am PST by
A new iPhone SE and an iPad 11 might be coming very soon. In late December, a private account on X with a track record of leaking accurate iOS-related information said devices codenamed "V59" and "J481" will be released alongside iOS 18.3 and iPadOS 18.3. Bloomberg's Mark Gurman has previously reported that "V59" is a new iPhone SE, and that "J481" is a new entry-level iPad. iOS 15.3, iOS ...
M6 MacBook Pro Feature 1

5 Reasons to Wait for Next Year's MacBook Pro

Wednesday January 8, 2025 6:33 am PST by
Apple in October 2024 overhauled its 14-inch and 16-inch MacBook Pro models, adding M4, M4 Pro, and M4 Max chips, Thunderbolt 5 ports on higher-end models, display changes, and more. That's quite a lot of updates in one go, but if you think this means a further major refresh for the MacBook Pro is now several years away, think again. Bloomberg's Mark Gurman has said he expects only a small...
airpods pro 2 botw

Hearing a Mysterious Chime From Your AirPods Pro Case? It's a Feature

Thursday January 9, 2025 3:42 pm PST by
If you've been hearing a chiming sound from your AirPods Pro 2 case when the AirPods are charging, it's a feature that Apple added with the launch of Hearing Health last year. In a support guide, Apple says that the AirPods Pro may play a sound every so often while in the case to ensure the microphones and speakers are working as intended. From Apple: To help ensure that your AirPods...
iOS 18

Apple Releases iOS 18.2.1 With Bug Fixes

Monday January 6, 2025 10:07 am PST by
Apple today released iOS 18.2.1 and iPadOS 18.2.1, minor updates to the iOS 18 and iPadOS 18 operating systems. iOS 18.2.1 and iPadOS 18.2.1 come almost a month after Apple released iOS 18.2 and iPadOS 18.2. The new software can be downloaded on eligible iPhones and iPads over-the-air by going to Settings > General > Software Update. According to Apple's release notes, iOS 18.2.1...
airpods 4 blue

Apple's Student Offer With Free AirPods Returns in These Four Countries

Thursday January 9, 2025 7:18 am PST by
Apple's annual "Back to School" or "Back to Uni" promotion has returned this week in Australia, New Zealand, Brazil, and South Korea. From January 8 through March 13, qualifying higher-education students and staff in these countries can receive free AirPods 4 with Active Noise Cancellation with the purchase of any new MacBook Air, MacBook Pro, or iMac, or a free Apple Pencil Pro or Apple...
LG UltraFine 6K Display TB5

LG Unveils UltraFine 6K Display With Thunderbolt 5 Support

Tuesday January 7, 2025 3:56 am PST by
LG has shown off a new Ultrafine 6K monitor at CES 2025. The 32-inch display is the first of its kind to support Thunderbolt 5, which Apple introduced late last year with the launch of new Mac mini and MacBook Pro models powered by M4 Pro chips. Details are scant, but we do know that the LG UltraFine 6K monitor (model 32U990A) features a Nano IPS Black panel, delivering a wide color gamut...

Top Rated Comments

danieldk Avatar
11 months ago
This kind of vulnerability is bad - future hardware revisions should solve it and mitigations should be put into place. However, glossing over the paper, this currently does not seem like a big threat to most users:

Emulating realistic attack scenarios, we assume that ct-swap runs in a victim process, separate from the attacker’s address space. We assume a simple but common protocol between victim and attacker, where the victim takes input from the attacker to populate the ct-swap’s a and b arrays and then executes ct-swap.

So, it assumes that not only has the attacker has a process running on a victim's machine, but that it can also feed input directly to the victim process. However, if a malicious actor already has a local process running with user privileges, there are so many possible attack vectors, that it's also often game over before this vulnerability. If you only install trusted software, you should be pretty safe.

What made Meltdown/Spectre so devastating on Intel CPUs is that they allowed snooping information without communication with the victim process and that e.g. Linux is used on many multi-tenant machines. So there is ample opportunity to eavesdrop on other people's machines.

It's a bit sad that Ars did not qualify the research further, because if you read the headline and article, it's as if the sky is falling on Apple Silicon CPUs. But (not surprisingly) it's not.
Score: 68 Votes (Like | Disagree)
brijazz Avatar
11 months ago
Still better than updating to 14.4 ;)
Score: 33 Votes (Like | Disagree)
danieldk Avatar
11 months ago

From Macworld this morning:
[...]
DMP-based attacks aren’t common, and they require a hacker to have physical access to a Mac. So, the best way to prevent an attack is you secure your user account on your Mac with a strong password, and do not let people you don’t know use your Mac. For more information on Mac security, read “;How to know if your Mac has been hacked ('https://www.macworld.com/article/676307/how-to-know-if-your-mac-has-been-hacked.html')” and “How secure is your Mac? ('https://www.macworld.com/article/668710/how-secure-mac.html')” Also consider running an antivirus program on your Mac ('https://www.macworld.com/article/670537/do-macs-need-antivirus.html').
By the way, MacWorld is incorrect here. It does not require physical access. A malicious actor needs to be able to run a process in your machine. This can also be accomplished by tricking the user to install malware, planting malware through vulnerabilities in programs that read untrusted data (web browser, iMessage, etc.).

If you don't install random software from the internet, you should be pretty safe.
Score: 27 Votes (Like | Disagree)
hovscorpion12 Avatar
11 months ago
Genuine question. Does this “exploit“ actually have an effect on users? Or this for specific individuals?
Score: 25 Votes (Like | Disagree)
mystery hill Avatar
11 months ago
This can be fixed by upgrading to M5.
Score: 23 Votes (Like | Disagree)
hovscorpion12 Avatar
11 months ago

Wonder how long Apple has known about this? I think we can safely assume based on past experience that Apple did nothing, hoping the public would never know.
The devs posted they informed Apple in Dec 2023.
Score: 21 Votes (Like | Disagree)