Stories
Slash Boxes
Comments

SoylentNews is people

posted by Fnord666 on Friday December 21 2018, @06:19PM   Printer-friendly
from the chaos-monkey dept.

Recent upgrades that depend on the new Linux getrandom() syscall can cause OpenSSH to delay starting for tens of minutes while waiting for enough bytes of randomness. There are currently not any feasible work-arounds.

Systemd makes this behaviour worse, see issue #4271, #4513 and #10621.
Basically as of now the entropy file saved as /var/lib/systemd/random-seed will not - drumroll - add entropy to the random pool when played back during boot. Actually it will. It will just not be accounted for. So Linux doesn't know. And continues blocking getrandom(). This is obviously different from SysVinit times when /var/lib/urandom/random-seed (that you still have laying around on updated systems) made sure the system carried enough entropy over reboot to continue working right after enough of the system was booted.

#4167 is a re-opened discussion about systemd eating randomness early at boot (hashmaps in PID 0...). Some Debian folks participate in the recent discussion and it is worth reading if you want to learn about the mess that booting a Linux system has become.

While we're talking systemd ... #10676 also means systems will use RDRAND in the future despite Ted Ts'o's warning on RDRAND [Archive.org mirror and mirrored locally as 130905_Ted_Tso_on_RDRAND.pdf, 205kB as Google+ will be discontinued in April 2019].

Related post: OneRNG: a Fully-Open Entropy Generator (2014)


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Interesting) by Pino P on Saturday December 22 2018, @08:58PM (3 children)

    by Pino P (4721) on Saturday December 22 2018, @08:58PM (#777655) Journal

    What workaround does OpenBSD employ to gather enough entropy to bring up OpenSSH and LibreSSL as quickly as possible after a restart or power cycle?

    Starting Score:    1  point
    Moderation   +1  
       Interesting=1, Total=1
    Extra 'Interesting' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3  
  • (Score: 2) by coolgopher on Sunday December 23 2018, @01:30AM (2 children)

    by coolgopher (1157) on Sunday December 23 2018, @01:30AM (#777710)

    It's been many years since I last touched OpenBSD, but I seem to recall it dumping out an entropy file on shutdown that then gets loaded on boot. The man page [openbsd.org] suggests the same:

    Systems with nonvolatile storage should store a secret from /dev/urandom on disk during installation or shutdown, and feed it back during boot, so that the work the operating system has done to gather entropy -- including the work its operator may have done to flip a coin! -- can be saved from one boot to the next, and so that newly installed systems are not vulnerable to generating cryptographic keys predictably.