linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kurt Roeckx <kurt@roeckx.be>
To: "Theodore Y. Ts'o" <tytso@mit.edu>,
	"Sebastian Andrzej Siewior" <sebastian@breakpoint.cc>,
	912087@bugs.debian.org,
	"Package Development List for OpenSSL packages."
	<pkg-openssl-devel@alioth-lists.debian.net>,
	linux-kernel@vger.kernel.org,
	"Bernhard Übelacker" <bernhardu@mailbox.org>,
	pkg-systemd-maintainers@lists.alioth.debian.org,
	debian-ssh@lists.debian.org, 912087-submitter@bugs.debian.org
Subject: Re: Bug#912087: openssh-server: Slow startup after the upgrade to 7.9p1
Date: Tue, 30 Oct 2018 19:37:23 +0100	[thread overview]
Message-ID: <20181030183723.GI10011@roeckx.be> (raw)
In-Reply-To: <20181030141544.GE15839@thunk.org>

On Tue, Oct 30, 2018 at 10:15:44AM -0400, Theodore Y. Ts'o wrote:
> On Tue, Oct 30, 2018 at 01:18:08AM +0100, Sebastian Andrzej Siewior wrote:
> > Using ioctl(/dev/urandom, RNDADDENTROPY, ) instead writting to
> > /dev/urandom would do the trick. Or using RNDADDTOENTCNT to increment
> > the entropy count after it was written. Those two are documented in
> > random(4). Or RNDRESEEDCRNG could be used to force crng to be reseeded.
> > It does also the job, too.
> > 
> > Ted, is there any best practise what to do with the seed which as
> > extrected from /dev/urandom on system shutdown? Using RNDADDTOENTCNT to
> > speed up init or just write to back to urandom and issue RNDRESEEDCRNG?
> 
> The reason why writing to /dev/[u]random via something like:
> 
>     cat /var/lib/random/seed > /dev/random
> 
> Dosn't bump the the entropy counter is because it's possible that an
> attacker could read /var/lib/random/seed.  Even if the seed file is
> refreshed on shutdown, (a) the attacker could have read the file while
> the system is down, or (b) the system could have crashed so the seed
> file was not refreshed and the attacker could have read the file
> before the crash.

So are you saying that the /var/lib/random/seed is untrusted, and
should never be used, and we should always wait for fresh entropy?

Anyway, I think if an attacker somehow has access to that file,
you have much more serious problems.


Kurt


  reply	other threads:[~2018-10-30 18:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20181029223334.GH10011@roeckx.be>
2018-10-30  0:18 ` Bug#912087: openssh-server: Slow startup after the upgrade to 7.9p1 Sebastian Andrzej Siewior
2018-10-30 14:15   ` Theodore Y. Ts'o
2018-10-30 18:37     ` Kurt Roeckx [this message]
2018-10-30 20:51       ` Theodore Y. Ts'o
2018-10-31 11:21         ` Sebastian Andrzej Siewior
2018-10-31 22:41           ` Theodore Y. Ts'o
2018-11-01 22:18             ` Sebastian Andrzej Siewior
2018-11-01 23:50               ` Theodore Y. Ts'o
2018-11-02  0:24                 ` Kurt Roeckx
2018-11-02  2:13                   ` Theodore Y. Ts'o
2018-11-04  0:18                 ` Sebastian Andrzej Siewior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181030183723.GI10011@roeckx.be \
    --to=kurt@roeckx.be \
    --cc=912087-submitter@bugs.debian.org \
    --cc=912087@bugs.debian.org \
    --cc=bernhardu@mailbox.org \
    --cc=debian-ssh@lists.debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pkg-openssl-devel@alioth-lists.debian.net \
    --cc=pkg-systemd-maintainers@lists.alioth.debian.org \
    --cc=sebastian@breakpoint.cc \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).