Firebird News

Monday, July 04, 2005

Crypto leaks across HyperThreaded CPUs (i386, P4, HTT+SMP only)

Abstract
========

The Pentium CPU shares caches between HyperThreads. This permits a local
process to gain a side-channel against cryptographic processes running
on the other HyperThread. Testing for cached data can be accomplished by
timing reads. Under some circumstances, this permits the spying process
to extract bits of the key. This has been demonstrated against OpenSSL.


Technical Details
=================

The full explanation of the issue can be found here:

http://www.daemonology.net/papers/htt.pdf


This issue affects only a subset of i386 systems.

Your system is not affected if you are running a CPU without HyperThreading.

Your system is not affected if you are running a non-SMP kernel.

Your system is not affected if you have disabled HyperThreading in your
BIOS, and confirmed that the virtual CPUs are not detected by the kernel
during boot.

Your system is affected, but probably not at risk, if you do not permit
shell access by untrusted users.


Additional resources:

http://www.daemonology.net/hyperthreading-considered-harmful/
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-05:09.htt.asc


Solutions and Workarounds
=========================

This issue is fundamental to the design and implementation of
HyperThreading in Intel processors. Avoiding the problem is possible,
and two workarounds are available now. Others which may appear later are
also discussed.

Option 1. Disable HyperThreading in the BIOS.

Disabling HyperThreading is a complete workaround for the issue.

Option 2. Run a non-SMP kernel.

On single physical CPU systems, running a non-SMP kernel
effectively disables HyperThreading. On a multi-CPU system, this
option is not the best solution, since it will disable
additional physical CPUs as well.


::::

No comments: