News for hackers. Stuff that matters.
Re:AMD Ryzen 3000 Post-Review BIOS Update Recap: Larger ST G... by Mirioron on Saturday July 13, 2019 @06:55PM (#20430654)
>1. RDRAND returns -1 (and sets the carry bit meaning it thinks -1 is a random number). Supposedly this will be fixed in a BIOS update (which makes me think it's an intended mode wrongly turned on... a backdoor?)

Yet more evidence not to trust hardware random number generators.

Re:AMD Ryzen 3000 Post-Review BIOS Update Recap: Larger ST G... by userbinator on Saturday July 13, 2019 @08:07PM (#20430886)
I'm very surprised that something like that even makes it into production. You'd think processor manufacturers would have an extensive set of test cases, at least one for each instruction...

I remember reading somewhere that, for a long time, Intel's "test cases" basically consisted of all the operating systems they could find, going back to MS-DOS 1.0 and including some more obscured ones, as well as tons of other third-party software.

Unfortunately it seems this new generation no longer follows the "NEVER break backwards compatibility" principle that made the PC such a great platform, and as a result we're seeing hardware/software/firmware that's increasingly buggy and divergent. It used to be the case that if a new processor couldn't run existing software (even that which depended on undocumented but constant behaviour) unmodified, it was a fatal flaw.

Re:AMD Ryzen 3000 Post-Review BIOS Update Recap: Larger ST G... by pjc50 on Sunday July 14, 2019 @06:26AM (#20432715)
Everything on a CPU is subject to heavy validation .. but I bet the random number generator is exempt, because by definition it's not deterministic. It's more like a peripheral "listening" to randomness.

https://www.amd.com/system/files/TechDocs/amd-random-number-...

> "The RNG uses 16 separate ring oscillator chains as a noise source. Each chain consists of a different prime number of inverters in a free-running configuration which capture natural clock jitter"

So it's (deliberately) dependent on natural manufacturing variation in the silicon, and in any deterministic simulator won't produce random numbers. It also takes a while to start; it's possible that the startup conditions are bad such that "a while" turns out to be "forever".

Re:AMD Ryzen 3000 Post-Review BIOS Update Recap: Larger ST G... by mulmen on Sunday July 14, 2019 @06:44AM (#20432764)
Probably still worth checking that it doesn't return -1 every time.
Re:AMD Ryzen 3000 Post-Review BIOS Update Recap: Larger ST G... by NullPrefix on Sunday July 14, 2019 @08:41AM (#20433072)
Infinity of -1's is a valid random sequence, just saying.
Re:AMD Ryzen 3000 Post-Review BIOS Update Recap: Larger ST G... by im_down_w_otp on Saturday July 13, 2019 @09:56PM (#20431202)
They have way, way more than test cases. The logic synthesis, simulation, verification, and validation capabilities of top tier EDA tools are incredible.

The problem is as it always is with these kinds of things. They help assure that you can measure your model and your implementation of that model. They're much less capable of determining you've got the right model to begin with. That part is still up to the humans.

The state of commonplace capabilities for testing and verification of software is extremely far behind that of hardware. For a variety of economic, cultural, and use case incentives reasons.

Re:AMD Ryzen 3000 Post-Review BIOS Update Recap: Larger ST G... by ezoe on Sunday July 14, 2019 @02:43AM (#20432041)
This should teach systemd developers and other idiots who blindly use rdrand a lesson not to trust it.
Re:AMD Ryzen 3000 Post-Review BIOS Update Recap: Larger ST G... by dang on Sunday July 14, 2019 @06:02PM (#20436436)
Can you please follow the site guidelines when posting here?

https://news.ycombinator.com/newsguidelines.html

Re:AMD Ryzen 3000 Post-Review BIOS Update Recap: Larger ST G... by IntelMiner on Sunday July 14, 2019 @02:52AM (#20432076)
Have you read systemd's code comments regarding rdrand? It's quite a reasonable explanation
Re:AMD Ryzen 3000 Post-Review BIOS Update Recap: Larger ST G... by ezoe on Sunday July 14, 2019 @02:55AM (#20432088)
I have just read it. Well I have to say it's quite a reasonable.

https://github.com/systemd/systemd/blob/f90bcf8679e870878829...

Re:AMD Ryzen 3000 Post-Review BIOS Update Recap: Larger ST G... by jammygit on Sunday July 14, 2019 @03:05AM (#20432113)
"In such an environment using getrandom() synchronously means we'd block the entire system boot-up until the pool is initialized, i.e. very long."

How long is very long? 100ms, or 10s?

Re:AMD Ryzen 3000 Post-Review BIOS Update Recap: Larger ST G... by terom on Sunday July 14, 2019 @08:02AM (#20432973)
Debian buster VM on an old CPU without RDRAND takes about 5 minutes for the kernel crng init to complete and for sshd to start accepting connections. Stracing the sshd process shows that it's indeed blocked on `getrandom()`.

In some ways, it's very much WONTFIX because something like sshd might actually need the entropy. I'm glad that systemd has proper workarounds implemented so that the machine actually boots out of the box, though.

Re:AMD Ryzen 3000 Post-Review BIOS Update Recap: Larger ST G... by megous on Sunday July 14, 2019 @04:12AM (#20432343)
"It is very common that initialization of the random pool takes a longer time (up to many minutes..."

And it's my experience, too. It's one reason to install something like haveged. I had boot delays in the range of minutes, without it.

Re:AMD Ryzen 3000 Post-Review BIOS Update Recap: Larger ST G... by viraptor on Sunday July 14, 2019 @04:34AM (#20432409)
> So, you are a "security researcher", and you wonder why we bother

Oh, the art of insulting the audience in the first line of a message intended for them. And it ends up being the person you'd expect to write it.

Re:AMD Ryzen 3000 Post-Review BIOS Update Recap: Larger ST G... by chronogram on Sunday July 14, 2019 @04:37AM (#20432415)
First you call people idiots and then you say it’s reasonable without apology. Classic.
Re:AMD Ryzen 3000 Post-Review BIOS Update Recap: Larger ST G... by ezoe on Sunday July 14, 2019 @11:20PM (#20437878)
I still believe we shall never relies on rdrand because we cannot trust the hardware RNG implementation. For me, anybody who use rdrand a idiot unless it's a video game. I said "reasonable" for their argument. I do not agree with them.