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


Groups > linux.debian.kernel > #64402 > unrolled thread

Bug#931644: Buster kernel entropy pool too low on VM boot

Started by"Michael J. Redd" <micredd@gmail.com>
First post2019-07-08 19:10 +0200
Last post2020-02-08 19:40 +0100
Articles 8 — 4 participants

Back to article view | Back to linux.debian.kernel


Contents

  Bug#931644: Buster kernel entropy pool too low on VM boot "Michael J. Redd" <micredd@gmail.com> - 2019-07-08 19:10 +0200
    Bug#931644: Buster kernel entropy pool too low on VM boot Andy Smith <andy@strugglers.net> - 2019-07-08 20:10 +0200
      Bug#931644: Buster kernel entropy pool too low on VM boot "Michael J. Redd" <micredd@gmail.com> - 2019-07-11 15:50 +0200
        Bug#931644: Buster kernel entropy pool too low on VM boot Noah Meyerhans <noahm@debian.org> - 2020-01-10 00:00 +0100
          Bug#931644: Buster kernel entropy pool too low on VM boot "Michael J. Redd" <micredd@gmail.com> - 2020-02-06 21:40 +0100
            Bug#931644: Buster kernel entropy pool too low on VM boot Salvatore Bonaccorso <carnil@debian.org> - 2020-02-06 21:50 +0100
              Bug#931644: Buster kernel entropy pool too low on VM boot "Michael J. Redd" <micredd@gmail.com> - 2020-02-08 17:40 +0100
                Bug#931644: Buster kernel entropy pool too low on VM boot Salvatore Bonaccorso <carnil@debian.org> - 2020-02-08 19:40 +0100

#64402 — Bug#931644: Buster kernel entropy pool too low on VM boot

From"Michael J. Redd" <micredd@gmail.com>
Date2019-07-08 19:10 +0200
SubjectBug#931644: Buster kernel entropy pool too low on VM boot
Message-ID<yhFjj-Qe-1@gated-at.bofh.it>
Package: linux-image-4.19.0-5-amd64
Version: 4.19.0-5

Issue:
======

After upgrading to Debian Buster, Xen PV guests' entropy pool is too
low to start cryptographic services in a timely manner. This results in
30+ second delays in the startup of services such as SSH. If I connect
to the VM's virtual VNC console and move the mouse during boot, the
system very rapidly collects entropy and crypto-dependent services like
SSH start with no delay.

The symptoms are identical to a bug I reported for Debian 9 (bug
#897917).

Workaround:
===========

Install `haveged`. If another RNG feeds the entropy pool, the VM and
its services boot as expected.

[toc] | [next] | [standalone]


#64403

FromAndy Smith <andy@strugglers.net>
Date2019-07-08 20:10 +0200
Message-ID<yhGfn-1pj-9@gated-at.bofh.it>
In reply to#64402
Hi Michael,

On Mon, Jul 08, 2019 at 12:59:29PM -0400, Michael J. Redd wrote:
> After upgrading to Debian Buster, Xen PV guests' entropy pool is too
> low to start cryptographic services in a timely manner. This results in
> 30+ second delays in the startup of services such as SSH.

The release notes for buster do mention this issue and provide a
link to:

    https://wiki.debian.org/BoottimeEntropyStarvation

which has your Haveged solution as one of its suggestions.

Cheers,
Andy

[toc] | [prev] | [next] | [standalone]


#64421

From"Michael J. Redd" <micredd@gmail.com>
Date2019-07-11 15:50 +0200
Message-ID<yiHCp-6A8-7@gated-at.bofh.it>
In reply to#64403
> The release notes for buster do mention this issue and provide a
> link to:
> 
>     https://wiki.debian.org/BoottimeEntropyStarvation
> 
> which has your Haveged solution as one of its suggestions.
> 

D'oh! Serves me right for just skimming the release notes, then. After
doing some in-depth reading, this is a problem for the Linux community
at large. Wow. While I'm glad the kernel's getting choosier about where
and how to harvest entropy and can personally live with the ~30 seconds
added to VM boot times, it could be painful to, for example, bootstrap
a Linux guest on AWS for the first time and wait for the initial SSH
keys to be created.

Will be interesting to see how this evolves over time. In the meantime,
as this is not actually a kernel defect, I suppose this bug can be
closed.

-Michael

[toc] | [prev] | [next] | [standalone]


#66048

FromNoah Meyerhans <noahm@debian.org>
Date2020-01-10 00:00 +0100
Message-ID<zmOWt-1JF-1@gated-at.bofh.it>
In reply to#64421
On Thu, Jul 11, 2019 at 09:42:17AM -0400, Michael J. Redd wrote:
> > The release notes for buster do mention this issue and provide a
> > link to:
> > 
> >     https://wiki.debian.org/BoottimeEntropyStarvation
> > 
> > which has your Haveged solution as one of its suggestions.
> > 
> 
> D'oh! Serves me right for just skimming the release notes, then. After
> doing some in-depth reading, this is a problem for the Linux community
> at large. Wow. While I'm glad the kernel's getting choosier about where
> and how to harvest entropy and can personally live with the ~30 seconds
> added to VM boot times, it could be painful to, for example, bootstrap
> a Linux guest on AWS for the first time and wait for the initial SSH
> keys to be created.
> 
> Will be interesting to see how this evolves over time. In the meantime,
> as this is not actually a kernel defect, I suppose this bug can be
> closed.

I suspect that this bug might end up being mergeable with
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=948519.  In that bug,
I am investigating cherry-picking commit 50ee7529ec45 from the linux
mainline branch for buster.  At least on the arm64 ec2 instances where
I've tested, this change resolves the issue.

If I provide a package for you, would you be able to test it in your
environment to see if the proposed patch addresses the problem there?

Thanks
noah

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=50ee7529ec45

[toc] | [prev] | [next] | [standalone]


#66321

From"Michael J. Redd" <micredd@gmail.com>
Date2020-02-06 21:40 +0100
Message-ID<zwW6m-1Ih-3@gated-at.bofh.it>
In reply to#66048
Apologies for the late reply. I can certainly test on some of my VMs if
you're willing to provide packages.

Reading over Linus' explanation of deriving jitter from the CPU's cycle
counter, while I'm no cryptographer, I might have some concerns about
the quality of the entropy that will be generated by this patch on
hypervisors that virtualize the time stamp counter. In my environment,
I know I can instruct Xen to never virtualize the TSC (
https://xenbits.xen.org/docs/unstable/man/xen-tscmode.7.html), which
would probably benefit the patch, but AWS and other public cloud users
may not have that option.

-Michael

[toc] | [prev] | [next] | [standalone]


#66322

FromSalvatore Bonaccorso <carnil@debian.org>
Date2020-02-06 21:50 +0100
Message-ID<zwWg1-1LB-1@gated-at.bofh.it>
In reply to#66321
Hi Michael,

On Thu, Feb 06, 2020 at 03:36:49PM -0500, Michael J. Redd wrote:
> Apologies for the late reply. I can certainly test on some of my VMs if
> you're willing to provide packages.

The packages containing the change Noah mentioned will be released in
two days with the 10.3 point release. Right now it's available via
buster-proposed-updates, See
https://www.debian.org/releases/proposed-updates .

Does this helps?

Regards,
Salvatore

[toc] | [prev] | [next] | [standalone]


#66323

From"Michael J. Redd" <micredd@gmail.com>
Date2020-02-08 17:40 +0100
Message-ID<zxBjb-3QC-1@gated-at.bofh.it>
In reply to#66322
I've upgraded my VMs to the 10.3 point release and can confirm that
cryptographic services (SSH and others) start quite rapidly now on
system boot.

Thanks, all!

-Michael

[toc] | [prev] | [next] | [standalone]


#66327

FromSalvatore Bonaccorso <carnil@debian.org>
Date2020-02-08 19:40 +0100
Message-ID<zxDbk-4ZV-9@gated-at.bofh.it>
In reply to#66323
Hi Michael,

On Sat, Feb 08, 2020 at 11:38:23AM -0500, Michael J. Redd wrote:
> I've upgraded my VMs to the 10.3 point release and can confirm that
> cryptographic services (SSH and others) start quite rapidly now on
> system boot.

Thanks for confirming!

Closing then the bug as well with 4.19.98-1.

Regards,
Salvatore

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web