lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190408063154.7bnt6puawoqtwlgo@gondor.apana.org.au>
Date:   Mon, 8 Apr 2019 14:31:54 +0800
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     Laurent Vivier <lvivier@...hat.com>
Cc:     linux-kernel@...r.kernel.org, linux-crypto@...r.kernel.org,
        Matt Mackall <mpm@...enic.com>
Subject: Re: [PATCH] hwrng: core - don't block in add_early_randomness()

On Fri, Mar 29, 2019 at 05:30:11PM +0100, Laurent Vivier wrote:
> If the device is not ready to provide data the kernel will
> be stuck indefinitely in the init function.
> 
> This is not a problem if the device is driven using a module,
> but if the driver is linked directly into the kernel then the
> kernel boot sequence hangs.
> 
> This can happen with virtio-rng device with rng-egd backend
> with no data provider, for instance with QEMU command line parameters:
> 
> ...
>     -chardev socket,id=charrng0,host=localhost,port=2345,server,nowait \
>     -object rng-egd,id=objrng0,chardev=charrng0 \
>     -device virtio-rng-pci,rng=objrng0,id=rng0
> 
> To avoid that, we can call rng_get_data() in non blocking mode because
> the function already manages the case where byte_read is
> 0 (if the device is not already initialized).
> 
> See also commit d3cc7996473a
> ("hwrng: fetch randomness only after device init")
> 
> Signed-off-by: Laurent Vivier <lvivier@...hat.com>

I think this is either not a bug (make sure that the user supplies
a RNG source) or it should be addressed in virtio-rng.

Cheers,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ