The "Hertzbleed" vulnerability
Hertzbleed takes advantage of our experiments showing that, under certain circumstances, the dynamic frequency scaling of modern x86 processors depends on the data being processed. This means that, on modern processors, the same program can run at a different CPU frequency (and therefore take a different wall time) when computing, for example, 2022 + 23823 compared to 2022 + 24436.
Posted Jun 14, 2022 20:54 UTC (Tue)
by flussence (guest, #85566)
[Link] (11 responses)
Oh, nothing to worry about then. I do that already because I've never seen a single measurable benefit from it on a Ryzen and it only increases peak CPU temps by 20°C. Highly recommend others give it a try, regardless of this week's alarmism.
Put `printf 0 >| /sys/devices/system/cpu/cpufreq/boost` in your startup scripts, or do the equivalent in a udev rule if you want to be fancy. Simple.
Posted Jun 14, 2022 22:15 UTC (Tue)
by bartoc (guest, #124262)
[Link] (2 responses)
How much does this increase power usage? Like this sort of thing matters the most for servers/multitenant machines, and those definitely do want scaling.
Posted Jun 15, 2022 9:26 UTC (Wed)
by eduperez (guest, #11232)
[Link] (1 responses)
Posted Jun 15, 2022 19:21 UTC (Wed)
by bartoc (guest, #124262)
[Link]
Comment fully retracted :)
Posted Jun 15, 2022 0:41 UTC (Wed)
by jmclnx (guest, #72456)
[Link]
echo "1" > /sys/devices/system/cpu/intel_pstate/no_turbo
and no performance issues for me on a Laptop
I found that in the link below, interesting it is from 2019, but since I found out gamers do that in order to do something else to max their CPU out.
https://sleeplessbeastie.eu/2019/07/15/how-to-disable-int...
Posted Jun 15, 2022 1:04 UTC (Wed)
by ccchips (subscriber, #3222)
[Link] (3 responses)
Posted Jun 15, 2022 5:00 UTC (Wed)
by devnull13 (subscriber, #18626)
[Link]
Posted Jun 15, 2022 18:12 UTC (Wed)
by flussence (guest, #85566)
[Link]
Posted Jun 24, 2022 3:05 UTC (Fri)
by danielwagenaar (guest, #14814)
[Link]
sudo echo 1 > /sys/whatever
only the "echo 1" is run as root. The piping to "/sys/whatever" is done by your shell using your regular user account. Hence the idiom
echo 1 | sudo tee /sys/whatever
which runs the "echo 1" under your regular user account, and lets the "tee" command copy the output out to "/sys/whatever" as root.
Hope that helps.
Posted Jun 15, 2022 14:34 UTC (Wed)
by nye (subscriber, #51576)
[Link] (2 responses)
If you can't measure a performance difference, you have something very wrong with one or more of your hardware, BIOS, and/or kernel - you should generally be seeing around 30% depending on the specific CPU.
I'd say maybe it's just not working at all, but that wouldn't explain the heat increase so there must be something more going on, eg you have bad hardware and it's increasing the voltage a huge amount in order to get a tiny boost. I had a 3700x which was absolute garbage so AMD is definitely producing some bad silicon, but even then the speed difference was meaningful; it's just that the temperature increase was wildly non-linear.
Posted Jun 15, 2022 18:10 UTC (Wed)
by flussence (guest, #85566)
[Link] (1 responses)
Posted Jun 20, 2022 15:58 UTC (Mon)
by eduperez (guest, #11232)
[Link]
Posted Jun 14, 2022 21:13 UTC (Tue)
by jhhaller (guest, #56103)
[Link]
Posted Jun 14, 2022 21:41 UTC (Tue)
by pjhacnau (subscriber, #4223)
[Link] (1 responses)
It's been a while since I've seen a good vulerability logo . . . my Meltdown T-shirt is wearing out . . .
Posted Jun 14, 2022 22:40 UTC (Tue)
by Henning (subscriber, #37195)
[Link]
Posted Jun 15, 2022 10:10 UTC (Wed)
by wtarreau (subscriber, #51152)
[Link] (8 responses)
Note that usually you can change the periodicity of the power measure using one MSR that's essentially used to divide it. It could likely be sufficient to smooth it enough so that nothing can be taken out of it even on an idle machine.
Posted Jun 15, 2022 13:16 UTC (Wed)
by snajpa (subscriber, #73467)
[Link]
Posted Jun 15, 2022 15:07 UTC (Wed)
by Paf (subscriber, #91811)
[Link] (5 responses)
Posted Jun 15, 2022 16:44 UTC (Wed)
by wtarreau (subscriber, #51152)
[Link] (4 responses)
Posted Jun 16, 2022 14:09 UTC (Thu)
by developer122 (guest, #152928)
[Link] (3 responses)
Attacker feeds in chosen tests, sets their watch.
Power consumption is only an indirect mechanism. Some computations take more power. Taking more power affects time because of CPU boost scaling. The attacker doesn't actually need to be able to measure power consumption directly.
This is *not* plundervolt.
Posted Jun 17, 2022 16:42 UTC (Fri)
by wtarreau (subscriber, #51152)
[Link] (2 responses)
Posted Jun 18, 2022 21:48 UTC (Sat)
by Paf (subscriber, #91811)
[Link] (1 responses)
But of course that basically means disabling high frequency power adjustments, so how bad is that?
Posted Jun 21, 2022 20:40 UTC (Tue)
by wtarreau (subscriber, #51152)
[Link]
Posted Jun 21, 2022 10:19 UTC (Tue)
by eduperez (guest, #11232)
[Link]
Posted Jun 16, 2022 8:52 UTC (Thu)
by anton (subscriber, #25547)
[Link] (4 responses)
Concerning mitigations, the need for constant power makes me think of ECL (a circuit design method), which achieves constant current by IIRC letting the current run through exactly one of two complementary lines. Can we achieve constant power by also performing a computation complementary to the one we want to perform, resulting in constant power overall?
Posted Jun 16, 2022 12:36 UTC (Thu)
by hkario (subscriber, #94864)
[Link] (3 responses)
Yes, but it is counter opposed by the CPUs need to be power efficient. And it's not just power efficiency for the mobile, or high density computing, it's also so that it generates less heat, so that it can run at higher clock speeds longer.
Posted Jun 16, 2022 14:24 UTC (Thu)
by anton (subscriber, #25547)
[Link] (2 responses)
Posted Jun 18, 2022 21:51 UTC (Sat)
by Paf (subscriber, #91811)
[Link] (1 responses)
Posted Jun 19, 2022 17:07 UTC (Sun)
by anton (subscriber, #25547)
[Link]
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
Spectre and now this hertzbleed feels like they will stay relevant. I just wish there was a good rowhammer logo to go with them.
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
Results come back, attacker checks their watch and notes the time.
Repeat until enough text+timing measurements have been taken to deduce the secrets.
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
The attack is against SIKE, not something more well-known, and a similar attack on SIKE has been discovered independently. This gives me some hope that most other "constant-time" cryptographic code is harder to exploit and that mitigations are not that hard. But of course, this was just the first attack, others might be coming in the future, and the paper mentions that another group has attacked AES-NI through a frequency side-channel (but required lowering the power limits, i.e., a privileged attacker).
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
My idea was to add the complementary computation in software, only for the code that deals with these supersecrets, like cryptographic keys. But it's not clear to me whether we can do such complementary computations in software.
The "Hertzbleed" vulnerability
The "Hertzbleed" vulnerability
Yes, that's what I would have expected. However, the present attack works across different CPU models, so apparently it uses some common property. A defense against this attack could also use that common property.
The "Hertzbleed" vulnerability