Live data from Hacker News

MIT researchers uncover ‘unpatchable’ flaw in Apple M1 chips

techcrunch.com

21–30 of 204 posts

Re: MIT researchers uncover ‘unpatchable’ flaw in Apple M1 chips

#21
post #8

As someone with a bit of experience in this area, IMO, the Techcrunch article is more confusing than it should be. Here's a link to the actual abstract. The work will be presented at ISCA, which will start on June 18. https://dl.acm.org/doi/10.1145/3470496.3527429 Here's a link to MIT's press release. https://www.csail.mit.edu/news/researchers-discover-new-hard... Here's a link to the vulnerability's website, as is t…

Having grokked the abstract, I feel like can speculate a bit as to what is going on. Take this with a grain of salt; I have no clue what has actually been discovered.

I believe that the researchers have found a way to remove PAC as a barrier to exploitation by disclosing PAC verification results via speculative execution. This is only useful to attackers going after a target that uses PAC, and those attackers will need to have another vulnerability that enables them to hijack control-flow through modifying pointers to code that are located in memory.

The attackers can use this new Pacman vulnerability as a crash-free oracle that says whether their forged pointer worked, and once they find a working one, they can use that to hijack control flow.

PAC (or Pointer Authentication) is a security feature found in recent iPhones, the Apple Silicon Macs, and the Graviton3. It is intended as a defense against control-flow hijacks. It works by signing pointers found in memory with one of five keys that are known only to the processor. Before the pointer is used, the processor should be instructed to "authenticate" the pointer by checking the pointer's signature using its private keys. To prevent simple reuse of one authenticated pointer used in one place to a pointer used in another place in the program, code can provide a "context" value to be used during the authentication.

A great resource for learning about PAC and its usage in the Apple platforms is at [1] (it links to other resources) and if you want to play with a PAC enabled binary, check out [2]

[1]: https://googleprojectzero.blogspot.com/2019/02/examining-poi...

[2]: https://blog.ret2.io/2021/06/16/intro-to-pac-arm64/

EDIT: The attack works by:

1) Place your guess such that it is used as the pointer input to an authentication instruction

2) Causing a branch misprediction. On the not-taken side of the branch, code needs to perform a pointer authentication and usage of the pointer. On the taken side of the branch, code should not crash.

3) CPU speculatively executes down the not-taken side of the branch (misprediction) and speculatively executes the authentication instruction.

4) If your guess is correct, the authentication instruction will return a valid pointer. If your guess is incorrect, the authentication instruction returns a pointer that, if dereferenced, will cause an exception.

5) CPU speculatively executes a load (in the case of a data pointer) or an instruction fetch (in the case of a code pointer) on the pointer value.

6) If the pointer is valid, the address translation for that pointer will appear in the TLB. If the pointer is not valid, it will not (because of the exception).

7) All of the effects from this mispredicted branch get squashed when the CPU realizes that the branch is not taken. No exception is actually thrown!

8) Measure the TLB entries to determine whether the speculative address translation made it in. If it is present, you know that the guess is correct.

9) Repeat, up to 2^16 times.

Re: MIT researchers uncover ‘unpatchable’ flaw in Apple M1 chips

#22
post #12

Hi! Joseph (one of the authors) here. You can read more about our attack here: https://pacmanattack.com

(Will read the paper later) How lawyer-y do you think Bandai Namco will be?

They probably won't care about this, although I do find it weird when researchers make a whole website with custom domain just to publish something like this. Personally, it comes off as less trustworthy since it enters the same realm of bullshit as those market manipulation attacks on AMD a few years back[1]

Not saying that's what this is (I'm sure these are legitimate findings), but this tactic raises some red flags for me.

1: https://www.gamersnexus.net/industry/3260-assassination-atte...

Re: MIT researchers uncover ‘unpatchable’ flaw in Apple M1 chips

#23
post #21
post #8

As someone with a bit of experience in this area, IMO, the Techcrunch article is more confusing than it should be. Here's a link to the actual abstract. The work will be presented at ISCA, which will start on June 18. https://dl.acm.org/doi/10.1145/3470496.3527429 Here's a link to MIT's press release. https://www.csail.mit.edu/news/researchers-discover-new-hard... Here's a link to the vulnerability's website, as is t…

Having grokked the abstract, I feel like can speculate a bit as to what is going on. Take this with a grain of salt; I have no clue what has actually been discovered. I believe that the researchers have found a way to remove PAC as a barrier to exploitation by disclosing PAC verification results via speculative execution. This is only useful to attackers going after a target that uses PAC, and those attackers will ne…

You hit the nail right on the head! That's exactly what we did :)

Re: MIT researchers uncover ‘unpatchable’ flaw in Apple M1 chips

#24

This is the second hardware security flaw in the M1. Was this known to Apple in time for M2?

Just taking a stab in the dark, I guess we won't know until the M2s are out. On the site by the researchers, they have been in talks with Apple since 2021 about this. To there may be a fix in the M2. However, we won't know for sure until the M2s are out in the public and in the hands of researchers. I don't know what the turn around time is for silicon design on an Engineer's desk to TSMC to being placed in a board on a Mac. It could be that it was too late in 2021 to make a change.

Re: MIT researchers uncover ‘unpatchable’ flaw in Apple M1 chips

#26
post #12

Hi! Joseph (one of the authors) here. You can read more about our attack here: https://pacmanattack.com

(Will read the paper later) How lawyer-y do you think Bandai Namco will be?

Would have thought Arch Linux would have more of a case for their package manager (Pacman) seeing as now it could be confused with an exploit.

Re: MIT researchers uncover ‘unpatchable’ flaw in Apple M1 chips

#27
post #17

Earlier quoted context omitted.

As the article puts it, it's a breach in “last line” security defences. Specifically, it's a mitigation that applies when you already have code execution. It's nothing for most people to worry about. PACs are a new mitigation that Intel Macs didn't have, so it's not like it puts the M1 in a worse position than what it replaced.

> it's a mitigation that applies when you already have code execution Sounds like a huge deal if you want to run untrusted code inside a sandbox.

You still need a sandbox escape before this mitigation kicks in.

Re: MIT researchers uncover ‘unpatchable’ flaw in Apple M1 chips

#29

OT, but is anyone here also redirected to " " rel="nofollow">https://guce.advertising.com/collectIdentifiers?sessionId=3_... ", which gets blocked by µBlock Origin? It's a HTTP redirect. This only happens with my IPv6 landline internet connection (german carrier Telekom), via IPv4 mobile internet (T-Mobile) it loads fine. Happens with two different devices, so it shouldn't be a compromised device, Techcrunch TLS cert…

Your browser shouldn't even be capable of resolving advertising.com

You can use https://github.com/StevenBlack/hosts as your hosts file, but even better is TLD and wildcard domain blocking with dnsmasq or dnscrypt-proxy.

Re: MIT researchers uncover ‘unpatchable’ flaw in Apple M1 chips

#30
post #20

Earlier quoted context omitted.

This is a new security feature, which few computers have, so the fact that it does not work obviously has little practical importance. At worst it makes the new computers with this feature only as secure as any old computer. Nevertheless, the article is very important, because it shows that this supposedly security-improving feature has been implemented in a way that makes it useless (like it has also happened with s…

What are you basing “so it must not be used” on? I would think it can’t harm, ever.

Like you say, it does not do much harm if used.

Nevertheless, there is some small loss of performance, because instructions to compute the Pointer Authentication Code (PAC) must be inserted in the program, and possibly also instructions to authenticate the PAC, though the latter may be omitted if the function return instructions and the indirect jumps through pointers are replaced with instructions that combine the pointer authentication with the jump.

I have no idea whether on the Apple CPUs the jumps/returns with authentication have the same speed with the simple jumps/returns.

I suppose that the Apple compiler adds automatically the PAC computation and authentication instructions, so using this option does not increase the complexity of the source code.

Nevertheless, even if the performance impact of using PAC might not be important, whenever a security feature that does not work is used, there is the danger that there will be some people who do not know that it does not work, so they will believe that exploits are impossible and there is no need to be careful to avoid the possibility that an adversary might be able to modify a pointer, e.g. by crafting a special input to the application.

In general all the variants of pointer validation that have been recently introduced in all CPU architectures are just workarounds against the bugs introduced by programmers, because in a well written program there should be no way for an adversary to modify an internal pointer.

Post reply on HN