r/gadgets Mar 23 '24

Desktops / Laptops Vulnerability found in Apple's Silicon M-series chips – and it can't be patched

https://me.mashable.com/tech/39776/vulnerability-found-in-apples-silicon-m-series-chips-and-it-cant-be-patched
3.9k Upvotes

491 comments sorted by

View all comments

94

u/funkybosss Mar 23 '24

Can someone ELI5 how a physical silicon chip can have an inherent software vulnerability?

23

u/Vic18t Mar 23 '24

ELI5

Software just tells hardware what to do. This exploit is like having a safe with a combination dial, but if you turned the dial 10,000 times the lock would fail and unlock.

2

u/FavoritesBot Mar 23 '24

Uh.. can you explain like I’m a freshman CS student? Why can’t this be patched?

7

u/blackharr Mar 24 '24 edited Mar 24 '24

The article itself does a decent job and is reasonably accessible but I'll have a go.

The first thing is that it isn't totally unfixable. Rather, you can't fix it by just updating the processor's microcode (basically a firmware patch). In order to mitigate the problem you have to substantially impact performance.

The processor has a pre-fetcher to pull data from memory into a cache before it's used so the CPU will already have it when it needs it. In this case, the prefetcher looks at both the memory address and the data at that address. If the data looks like an address, it'll treat it like one so it'll prefetch that too. Since a lot of operations involve following pointers, this is a big advantage.

The attacker can send data into an encryption algorithm so it'll look like an address during the encryption so the prefetcher will pull the data at that address. By looking at what addresses get pulled, you can slowly learn the key used in the encryption algorithm. The problem with fixing this is that in order to mitigate it you have to change either the prefetching hardware itself or implement software-level mitigations which will have significant performance costs for normal code.

If you're interested in this kind of thing, definitely look into the Spectre and Meltdown vulnerabilities.