News for hackers. Stuff that matters.
Re:Some AMD CPU's RDRAND might not return random data after ... by zaroth on Tuesday May 07, 2019 @11:56AM (#19850675)
Sounds like a bit of code which was hard to trigger the negative test and therefore the fallback failed to work properly.

Not sure how the kernel devs generally go about testing the “this virtually never happens” code paths without adding debug switches to every unhappy path.

Certainly I doubt they are using DI/IoC to wrap an interface to RDRAND which allows unit testing the failure modes.

At least the result is a failure to generate a key, not a compromised key.

Re:Some AMD CPU's RDRAND might not return random data after ... by loeg on Tuesday May 07, 2019 @06:39PM (#19854087)
> Sounds like a bit of code which was hard to trigger the negative test and therefore the fallback failed to work properly.

No; it turns out that's giving systemd too much credit (sadly). See [1].

The problem appears to be that RDRAND was signalling success, but producing a nonrandom value. This is bad and a violation of the specification.

Can't speak to Linux kernel development, and in this particular case, that isn't the problem.

The linked bug involves systemd using the world's worst random number generator. A security engineer goes into more detail on this twitter thread[1]: https://twitter.com/FiloSottile/status/1125840275346198529 (or unrolled: https://threadreaderapp.com/thread/1125840275346198529.html?... ).

> At least the result is a failure to generate a key, not a compromised key.

In fact, the result is a compromised key -- the bug report is due to colliding "globally unique" identifies generated through a flawed random gathering process.

[dead]
Re:Some AMD CPU's RDRAND might not return random data after ... by JdeBP on Wednesday May 08, 2019 @08:01AM (#19858003)
Filippo Valsorda said nothing about keys. Xe did not mention them at all.
Re:Some AMD CPU's RDRAND might not return random data after ... by zaroth on Wednesday May 08, 2019 @03:49PM (#19862230)
The linked bug report showed errors using OpenSSL to generate keys after resume on an AMD platform. It seemed to indicate RDRAND returning an error code instead of entropy.

Sorry for any confusion.

Re:Some AMD CPU's RDRAND might not return random data after ... by nitrogen on Tuesday May 07, 2019 @09:55PM (#19855250)
UUIDs and hash table keys are probably what they meant by "keys".
Re:Some AMD CPU's RDRAND might not return random data after ... by marshray on Tuesday May 07, 2019 @03:43PM (#19852778)
The 'edit-compile-run-debug' cycle is so expensive, chip design is all about simulation.

Chip vendors, and the tools they use to design them, actually do a significant amount of work for error cases. This is important not just for correctness, but for production yield, reliability, temperature and radiation hardness, etc. As chips get larger and more dense this becomes more and more important.

Single Event Upset (where one bit flips) is an example of the type of error. https://en.wikipedia.org/wiki/Single_event_upset

Re:Some AMD CPU's RDRAND might not return random data after ... by SolarNet on Tuesday May 07, 2019 @01:22PM (#19851472)
Virtual machines perhaps.