r/ComputerSecurity • u/Miss_Understands_ • Aug 04 '23
How can a CPU hardware security flaw go undetected for so many years?
Bulletin ID: AMD-SB-7008
Type: Cross-Process Information Leak
Potential Impact: Information disclosure
Severity: Medium
Summary:
Under specific microarchitectural circumstances, a register in “Zen 2” CPUs may not be written to 0 correctly. This may cause data from another process and/or thread to be stored in the YMM register, which may allow an attacker to potentially access sensitive information.
And what does "written to 0 correctly" mean? Cache? Register 0? I'm just curious.
Wouldn't the adversary process have to interrupt the target process at exactly the right nanosecond when it was executing just the right code, and the value in that register has to be important.
It seems like a very obscure vulnerability. Even more than the speculative execution bug from a few years ago.
7
u/ikakWRK Aug 04 '23
How can it go this long undetected? Same reason you can hide a key for your door under a rock outside your house... It won't be found until somebody looks for it.
4
u/Matir Aug 04 '23
Modern CPU registers are actually just allocations in some internal SRAM, so chunks of that SRAM can be referred to by different register names at various times. (This allows for more instruction-level parallelism through something called register renaming.)
The AMD CPUs in question have some large registers for "vector" operations. One instruction for those is supposed to set the upper 128 bits to zero. Under very specific circumstances, it does not, but still leaves YMM mapped to some of the register file. This allows a process to read 128 bits of register file that might belong to another process.
Zenbleed requires three very specific operations to occur inside the processor (all are part of optimizations of the instruction set) in order:
vzeroupperThese are very specific circumstances, so they are quite unlikely to occur without looking for them (and then you'd also have to look at the top 128 bits of YMM).
You can't target the data you're looking for, so yes, it's quite opportunistic, but in my experience doing exploit analysis on this particular bug, it's not hard at all to get sensitive data (private keys, credentials, etc.)
6
u/magicmulder Aug 04 '23
German mag PCGH says:
Translated: The actual attack is carried out with a speed of 30 KB per core and second.
So it does appear to concern a data leak that is large enough to be potentially critical.