From: Adrian Bunk <bunk@stusta.de>
To: Mikko.Rapeli@bmw.de
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] openssl: Enable os option for with-rand-seed as well
Date: Fri, 20 Sep 2019 17:03:17 +0300 [thread overview]
Message-ID: <20190920140317.GA10364@localhost> (raw)
In-Reply-To: <20190920133829.GW6154@hiutale>
On Fri, Sep 20, 2019 at 01:38:29PM +0000, Mikko.Rapeli@bmw.de wrote:
> On Fri, Sep 20, 2019 at 03:13:44PM +0200, Andrey Zhizhikin wrote:
> > Hello Raj,
> >
> > On Tue, Sep 17, 2019 at 8:50 PM Khem Raj <raj.khem@gmail.com> wrote:
> > >
> > > with openSSL 1.1.1d we start seeing errors like
> > >
> > > Error Generating Key
> > > 139979727451584:error:2406C06E:random number generator:RAND_DRBG_instantiate:error retrieving entropy:../openssl-1.1.1d/crypto/rand/drbg_lib.c:342:
> > >
> > > when using openssl from openssl-native on build hosts, this is due to
> > > limiting the random seed to devrandom, to support older hosts, since the
> > > option allows to have a comma separated list of methods to try, we can
> > > try the default first and if that fails then fallback to devrandom, this
> > > will ensure that it keeps working with build systems which dont support
> > > getrandom()
> > >
> > > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > > Cc: Adrian Bunk <bunk@stusta.de>
> > > Cc: Alexander Kanavin <alex.kanavin@gmail.com>
> > > ---
> >
> > Just as a test report for this patch:
> >
> > I've tested this patch on the HW (i.MX8M Mini EVK) and unfortunately
> > my sshd given up with a message: PRNG is not seeded
>
> > Reverting commits (effectively rolling back to openssl 1.1.1c) made
> > sshd operable again.:
> > 53b5654d6e openssl: Enable os option for with-rand-seed as well
> > 2c6b9b918c openssl: Upgrade 1.1.1c -> 1.1.1d
>
> Do you have rng-tools on the image? That helped me with the kernel random pool
> initialization for sshd in iMX8 and openssl 1.1.1x.
>
> I don't see how 53b5654d6e could change this behavior for target openssl.
> 2c6b9b918c could change the behavior and would be suprise.
>...
OpenSSL is full of surprises...
CHANGES says:
Linux kernels 4.8 and later, don't have a reliable way to detect
that /dev/urandom has been properly seeded, so a failure is raised
for this case (i.e. the getentropy(2) call has already failed).
It seems to be correct to give an error here, and lack of rng-tools
and/or kernel support for the iMX8 RNG is something that should be
fixed by the user.
OTOH, this kind of changes make it hard to justify upgrading openssl
in stable branches.
> -Mikko
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
next prev parent reply other threads:[~2019-09-20 14:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-17 18:49 [PATCH] openssl: Enable os option for with-rand-seed as well Khem Raj
2019-09-18 7:20 ` Adrian Bunk
2019-09-18 14:25 ` Martin Jansa
2019-09-20 13:13 ` Andrey Zhizhikin
2019-09-20 13:38 ` Mikko.Rapeli
2019-09-20 14:03 ` Adrian Bunk [this message]
2019-09-20 14:04 ` Andrey Zhizhikin
2019-09-23 13:03 ` Andrey Zhizhikin
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=20190920140317.GA10364@localhost \
--to=bunk@stusta.de \
--cc=Mikko.Rapeli@bmw.de \
--cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox