All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	virtualization@lists.linux-foundation.org,
	Jeff Garzik <jeff@garzik.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	LKML <linux-kernel@vger.kernel.org>, Theodore Tso <tytso@mit.edu>,
	Matt Mackall <mpm@selenic.com>
Subject: Re: [PATCH 2/2] lguest: virtio-rng support
Date: Sat, 17 May 2008 08:57:07 -0700	[thread overview]
Message-ID: <482F0053.2000509@zytor.com> (raw)
In-Reply-To: <200805171628.03801.rusty@rustcorp.com.au>

Rusty Russell wrote:
>> Uhm, no.  It's not.  Unless the host provides actual entropy
>> information, you have a security hole.
> 
> Huh?  We just can't assume it adds entropy.  AFAICT rngd -H0 is what we want 
> here.

We can, if it comes from /dev/random.

>>> If we use /dev/random in the host, we risk a DoS.  But since /dev/random
>>> is 0666 on my system, perhaps noone actually cares?
>> There is no point in feeding the host /dev/urandom to the guest (except 
>> for seeding, which can be handled through other means); it will do its 
>> own mixing anyway.
> 
> Seeding is good, but unlikely to be done properly for first boot of some 
> standard virtualized container.  In practice, feeding /dev/urandom from the 
> host will make /dev/urandom harder to predict in the guest.

Only up to a point.

>> The reason to provide anything at all from the host 
>> is to give it "golden" entropy bits.
> 
> But you did not address the DoS question: can we ignore it?  Or are we trading 
> off a DoS in the host against a potential security weakness in the guest?
> 
> If so, how do we resolve it?

I don't think you have a DoS situation at all.  The worst thing is that 
you don't have any entropy available at all, at which point /dev/urandom 
is as insecure as it ever is.

	-hpa


  parent reply	other threads:[~2008-05-17 16:03 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-15 18:48 Virt RNG? Jeff Garzik
2008-05-15 19:53 ` Jeremy Fitzhardinge
2008-05-15 19:53   ` Jeremy Fitzhardinge
2008-05-15 20:26   ` Dor Laor
2008-05-15 20:31 ` Christian Borntraeger
2008-05-15 20:44   ` Jeff Garzik
2008-05-15 20:43 ` Jeff Dike
2008-05-15 23:43 ` Rusty Russell
2008-05-16  0:07   ` Henrique de Moraes Holschuh
2008-05-16  5:31   ` [PATCH 1/2] virtio: hardware random device Rusty Russell
2008-05-16  5:39     ` [PATCH 2/2] lguest: virtio-rng support Rusty Russell
2008-05-16 10:49       ` Johannes Berg
2008-05-16 10:49       ` Johannes Berg
2008-05-16 20:25         ` H. Peter Anvin
2008-05-16 20:25         ` H. Peter Anvin
2008-05-17  4:46         ` Rusty Russell
2008-05-17  4:50           ` H. Peter Anvin
2008-05-17  4:50             ` H. Peter Anvin
2008-05-17  6:28             ` Rusty Russell
2008-05-17  6:28             ` Rusty Russell
2008-05-17  6:43               ` Herbert Xu
2008-05-17  6:43                 ` Herbert Xu
2008-05-17  7:43                 ` Christian Borntraeger
2008-05-17  7:43                   ` Christian Borntraeger
2008-05-17 15:56                   ` H. Peter Anvin
2008-05-17 15:56                   ` H. Peter Anvin
2008-05-17  7:47               ` Jeremy Fitzhardinge
2008-05-19  9:05                 ` Rusty Russell
2008-05-19  9:05                 ` Rusty Russell
2008-05-19  9:10                   ` Jeremy Fitzhardinge
2008-05-19  9:28                     ` Rusty Russell
2008-05-19  9:28                     ` Rusty Russell
2008-05-19  9:45                       ` Jeremy Fitzhardinge
2008-05-19  9:45                       ` Jeremy Fitzhardinge
2008-05-19  9:10                   ` Jeremy Fitzhardinge
2008-05-17  7:47               ` Jeremy Fitzhardinge
2008-05-17 15:57               ` H. Peter Anvin [this message]
2008-05-17 15:57               ` H. Peter Anvin
2008-05-17  4:46         ` Rusty Russell
2008-05-16  5:39     ` Rusty Russell
2008-05-16  5:39     ` Rusty Russell
2008-05-16  7:31     ` [PATCH 1/2] virtio: hardware random device Christian Borntraeger
2008-05-16  7:31     ` Christian Borntraeger
2008-05-16  5:31   ` Rusty Russell

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=482F0053.2000509@zytor.com \
    --to=hpa@zytor.com \
    --cc=borntraeger@de.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jeff@garzik.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=rusty@rustcorp.com.au \
    --cc=tytso@mit.edu \
    --cc=virtualization@lists.linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.