Skip to contentSkip to conversation

Hyper-Threading Vulnerability

DISCUSSION [email protected] 2 participants 2 messages May 13, 2005 – May 14, 2005

lore
Share & tools
lore
#0 lore raw

The problem is with the *combination* of fine-grained multithreading, a shared cache, *and* high-resolution timing via RDTSC.

A far easier fix would be to disable RDTSC.
(A third possibility would be to disable the cache, but I assume that's too horrible to contemplate.)

When Intel implemented RDTSC, they were quite aware that it made a good covert channel and provided an enable bit (bit 2 of CR4) to control user-space access.

This attack is just showing that, with the tight coupling provided by hyperthreading, it's possible to receive "interesting" data from a process that is *not* deliberately transmitting. (Whereas the classic problem enfocing the Bell-Lapadula model comes from preventing *deliberate* transmission.)

If you don't want to disable it universally, how about providing, at the OS level, a way for a task to request that RDTSC be disabled while it is running? If another task tries to use it, it traps and one of the two (doesn't matter which!) gets rescheduled later when the other is not running.

If RDTSC is too annoying to disable, just interpret the same flag as a "schedule me solo" flag that prevents scheduling anything else (at least, not sharing the same ->mm) on the other virtual processor. (Of course, the time should count double for scheduler fairness purposes.)

#1 lore raw
Quoted 4 lines · On Fri, 2005-05-13 at 22:51 +0000, [email protected] wrote:

If RDTSC is too annoying to disable, just interpret the same flag as a "schedule me solo" flag that prevents scheduling anything else (at least, not sharing the same ->mm) on the other virtual processor. (Of course, the time should count double for scheduler fairness purposes.)

rdtsc is so unreliable on current hardware that no userspace app should be using it anyway; it's not synchronized on SMP, powermanagement impacts the rate of the ticks all the time etc etc. Basically it's worthless on modern machines for anything but in-kernel busy loops.