SHARE

A group of researchers at MIT have discovered a new hardware vulnerability in Apple’s M1 chips. The team, led by Joseph Ravichandran and Weon Taek Na, have demonstrated how the attack—dubbed PACMAN—can bypass one of the M1 chip’s deepest lines of defenses. While it all sounds scary, it’s not quite as worrying as you might think: Attackers can only use PACMAN to exploit an existing memory bug in the system, which can be patched. 

To understand this issue, it helps to know about “pointers,” which are one of the fundamental bits of code that a CPU uses to run your computer. It’s the bit that points to where another variable is stored in memory, and they allow it to perform operations without having to work with the full variable. You can think of them like the index of a book. If you want to check if, say, “coffee” is mentioned, it’s much quicker to scan the index than to scan the whole book. Because pointers are so important, they’re a common vector for attack. If you can change where a pointer points, you can trick the CPU into doing things it shouldn’t. 

To defend against these kinds of attacks, the M1 chip is the first desktop CPU to use a technique called “pointer authentication.” In an interview with MIT News, Ravichandran, one of the co-lead authors of the new paper, said, “When pointer authentication was introduced, a whole category of bugs suddenly became a lot harder to use for attacks.” PACMAN is an exploit that brings these bugs back into play. 

Pointer authentication works by using a 16-bit cryptographic hash called a Pointer Authentication Code, or PAC (hence the name, PACMAN), to protect pointers from being modified. With it active, an attacker has to know the PAC value of a pointer to change it, or the system will crash; so, under normal circumstances, an attacker can’t just brute-force the PAC values.

PACMAN’s big innovation is a way to brute force and thus discern the PAC values for a given pointer without crashing the system. The researchers call the setup the “PAC Oracle” and it is able to guess all 65,536 possible PAC values in under three minutes without crashing the system. It does this by running them as “speculative executions.” This is where it performs the operation just in case it needs it a little later, but doesn’t really follow through, so it never gets challenged by pointer authentication. (This is the bit that needs the software bug to work.)

Of course, just guessing the values doesn’t help. The PAC Oracle also needs to know when it guesses correctly. It does this by watching a hardware memory store called the translation lookaside buffer (or TLB) to see if it changes. If it guesses wrong, nothing happens; if it guesses right, one of the things stored in the TLB will change. 

So, once the PAC is known for a given pointer, the attacker can then use the existing software bug to take over the operating system’s kernel and do pretty much whatever they want. They could install spyware or ransomware, steal all your files, or anything else hackers like to do. (While this all may sound complex, in reality, these details are very simplified; if you want the full rundown of how PACMAN works, check out the research paper.)

PACMAN is a real vulnerability and, because of how it relies on hardware features of the M1 chip, can’t be patched or fixed, but it’s important to note that the M1 chip is still more secure than older chips. This exploit requires an existing software bug (which can be patched) to run, and pointer authentication still protects your computer from any exploits that don’t have a way to bypass it. But as Ravichandran says, “We’ve shown that pointer authentication as a last line of defense isn’t as absolute as we once thought it was.”

Ultimately, this is all part of a big game of cybersecurity whackamole. For every new security system, there are bugs and exploits to be found to bypass it. The next generations of chips will likely come up with some way to prevent attacks like PACMAN, and then researchers will find new vulnerabilities and ways around that. 

What’s more, there’s no evidence that PACMAN is being used in the wild. Because it relies on an existing bug, the best defense is to keep your computer up to date. This exploit works on M1 chips. The researchers haven’t confirmed that it works on M2 chips, which Apple just introduced, though they believe it is possible. 

Apple was made aware of the issue by the researchers last year. In a statement to TechCrunch, it said: “We want to thank the researchers for their collaboration as this proof of concept advances our understanding of these techniques. Based on our analysis as well as the details shared with us by the researchers, we have concluded this issue does not pose an immediate risk to our users and is insufficient to bypass operating system security protections on its own.”

All in all, that’s probably a fair assessment. All computers are vulnerable to hacks and attacks. This is just another tool for bad actors to use that chip engineers are going to need to fix. When one mole is whacked, another pops its head out.