Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Sep 2012 20:25:39 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        obrien@freebsd.org
Cc:        Arthur Mesh <arthurmesh@gmail.com>, freebsd-security@FreeBSD.org, Doug Barton <dougb@FreeBSD.org>, freebsd-rc@FreeBSD.org, Mark Murray <markm@FreeBSD.org>
Subject:   Re: svn commit: r239569 - head/etc/rc.d
Message-ID:  <86y5knovoc.fsf@ds4.des.no>
In-Reply-To: <20120906175747.GC13179@dragon.NUXI.org> (David O'Brien's message of "Thu, 6 Sep 2012 10:57:47 -0700")
References:  <201208221843.q7MIhLU4077951@svn.freebsd.org> <5043DBAF.40506@FreeBSD.org> <86y5kpcqc4.fsf@ds4.des.no> <20120906175747.GC13179@dragon.NUXI.org>

next in thread | previous in thread | raw e-mail | index | archive | help
David O'Brien <obrien@FreeBSD.org> writes:
> Dag-Erling Smrgrav <des@des.no> writes:
> > Speaking of rc.d and entropy, is the following code in /etc/rc.d/sshd
> > really necessary?
> > 	seeded=3D`sysctl -n kern.random.sys.seeded 2>/dev/null`
> > 	if [ "x${seeded}" !=3D "x" ] && [ ${seeded} -eq 0 ] ; then
> > 		warn "Setting entropy source to blocking mode."
> [...]
> Likely this is inspired by 3.2 'How Compromises are Exploited',
> 'Compromise of High-Value Keys Generated From Compromised Key' paragraph.
>
>     If the key that is being generated is vary valuable, the harm to the
>     system owner can be very large.

These are host keys.  I'd say they're moderately valuable - depending on
the machine and your point of view, they may be more or less valuable
than user keys - but they are usually generated under controlled
circumstances, rather than circumstances in which an attacker may be
able to influence the PRNG.

> Now that we have 'postrandom' possibly we should utilize the
> ${entropy_file} (and call postrandom again).
>
> Certainly [re]seeding with 'sysctl -a' and 'date' is poor and should be
> changed.

Well, currently it's a no-op since kern.random.sys.seeded is never 0 at
that point, if I understand correctly.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86y5knovoc.fsf>