Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1743333

Bug#912087: openssh-server: Slow startup after the upgrade to 7.9p1

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From "Theodore Y. Ts'o" <tytso@mit.edu>
Newsgroups linux.debian.bugs.dist, linux.kernel
Subject Bug#912087: openssh-server: Slow startup after the upgrade to 7.9p1
Date Tue, 30 Oct 2018 15:20:01 +0100
Message-ID <wOD29-8ce-1@gated-at.bofh.it> (permalink)
References <wOomu-7SK-15@gated-at.bofh.it> <wOq4V-u7-1@gated-at.bofh.it> <wNLXP-1Xv-1@gated-at.bofh.it> <wOq4V-u7-1@gated-at.bofh.it>
X-Original-To Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
X-Mailbox-Line From debian-bugs-dist-request@lists.debian.org Tue Oct 30 14:18:08 2018
Old-Return-Path <debbugs@buxtehude.debian.org>
X-Spam-Flag NO
X-Spam-Score -3.751
Reply-To "Theodore Y. Ts'o" <tytso@mit.edu>, 912087@bugs.debian.org
Resent-To debian-bugs-dist@lists.debian.org
Resent-Cc Debian OpenSSL Team <pkg-openssl-devel@lists.alioth.debian.org>
X-Debian-Pr-Message followup 912087
X-Debian-Pr-Package openssl
X-Debian-Pr-Source openssl
X-Spam-Bayes score:0.0000 Tokens: new, 17; hammy, 150; neutral, 121; spammy, 0. spammytokens: hammytokens:0.000-+--sk:config_, 0.000-+--sk:CONFIG_, 0.000-+--H*u:1.10.1, 0.000-+--H*UA:1.10.1, 0.000-+--H*UA:2018-07-13
Dkim-Signature v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=wqnl0Byl/Ja8fcv0nyZPDb2TwWsmDZPb4XrYgH6Yr28=; b=Oqz1dG0bZsj8bPR3Nwku/KSjZa sPTZpZ5Z6Fwe65xsOqnWE99otK5F42AjGjRJwA2NNAgtR2VjzQXs4Ni/NDJXJxiOPIPiYJRUKsvQN MDM2A9HUTwZE97paaJV5oQWmcU29UAPN6XZPUK34BzgM5WgSZylRABX51lS3BtuXe5Bo=;
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.10.1 (2018-07-13)
X-Sa-Exim-Connect-IP <locally generated>
X-Sa-Exim-Mail-From tytso@thunk.org
X-Sa-Exim-Scanned No (on imap.thunk.org); SAEximRunCond expanded to false
X-Crossassassin-Score 2
X-Debian-Message from BTS
X-Mailing-List <debian-bugs-dist@lists.debian.org> archive/latest/1494941
List-ID <debian-bugs-dist.lists.debian.org>
List-URL <https://lists.debian.org/debian-bugs-dist/>
Approved robomod@news.nic.it
Lines 41
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Cc Kurt Roeckx <kurt@roeckx.be>, 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
X-Original-Date Tue, 30 Oct 2018 10:15:44 -0400
X-Original-Message-ID <20181030141544.GE15839@thunk.org>
X-Original-References <20181029223334.GH10011@roeckx.be> <20181030001807.7wailpm37mlinsli@breakpoint.cc> <154070458824.7875.5742628083142648872.reportbug@mitsos> <20181030001807.7wailpm37mlinsli@breakpoint.cc>
Xref csiph.com linux.debian.bugs.dist:925164 linux.kernel:1743333

Cross-posted to 2 groups.

Show key headers only | View raw


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.

If you are using a VM, if the host has virtio-rng, using a kernel that
has virtio-rng support will solve the problem.  For qemu, this means
you can enable via something like this:

         -object rng-random,filename=/dev/urandom,id=rng0 \
	 -device virtio-rng-pci,rng=rng0

If you are using Google Compute Engine, I can't comment about future
product features, but I would encourage you to file a feature request
bug with Google requesting virtio-rng support ASAP.

On any VM (cloud or on-prem), since you have to trust the host
*anyway*, with v4.19, you can add random.trust_cpu=on to the boot
command-line, or build the kernel with CONFIG_RANDOM_TRUST_CPU.

For the Debian 4.18 kernel, this can be backported via commits
39a8883a2b98 and 9b25436662d5.

					- Ted

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#912087: openssh-server: Slow startup after the upgrade to 7.9p1 Sebastian Andrzej Siewior <sebastian@breakpoint.cc> - 2018-10-30 01:30 +0100
  Bug#912087: openssh-server: Slow startup after the upgrade to 7.9p1 "Theodore Y. Ts'o" <tytso@mit.edu> - 2018-10-30 15:20 +0100
    Bug#912087: openssh-server: Slow startup after the upgrade to 7.9p1 Kurt Roeckx <kurt@roeckx.be> - 2018-10-30 19:40 +0100
      Bug#912087: openssh-server: Slow startup after the upgrade to 7.9p1 "Theodore Y. Ts'o" <tytso@mit.edu> - 2018-10-30 22:00 +0100
        Bug#912087: openssh-server: Slow startup after the upgrade to 7.9p1 Sebastian Andrzej Siewior <sebastian@breakpoint.cc> - 2018-10-31 13:00 +0100
          Bug#912087: openssh-server: Slow startup after the upgrade to 7.9p1 "Theodore Y. Ts'o" <tytso@mit.edu> - 2018-10-31 23:50 +0100
            Bug#912087: openssh-server: Slow startup after the upgrade to 7.9p1 Sebastian Andrzej Siewior <sebastian@breakpoint.cc> - 2018-11-01 23:30 +0100
              Bug#912087: openssh-server: Slow startup after the upgrade to 7.9p1 "Theodore Y. Ts'o" <tytso@mit.edu> - 2018-11-02 01:00 +0100
                Bug#912087: openssh-server: Slow startup after the upgrade to 7.9p1 Kurt Roeckx <kurt@roeckx.be> - 2018-11-02 01:30 +0100
                Bug#912087: openssh-server: Slow startup after the upgrade to 7.9p1 "Theodore Y. Ts'o" <tytso@mit.edu> - 2018-11-02 03:20 +0100
                Bug#912087: openssh-server: Slow startup after the upgrade to 7.9p1 Sebastian Andrzej Siewior <sebastian@breakpoint.cc> - 2018-11-04 01:30 +0100

csiph-web