svn commit: r239569 - head/etc/rc.d

Dag-Erling Smørgrav des at des.no
Thu Sep 6 18:25:40 UTC 2012


David O'Brien <obrien at FreeBSD.org> writes:
> Dag-Erling Smrgrav <des at des.no> writes:
> > Speaking of rc.d and entropy, is the following code in /etc/rc.d/sshd
> > really necessary?
> > 	seeded=`sysctl -n kern.random.sys.seeded 2>/dev/null`
> > 	if [ "x${seeded}" != "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
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-security mailing list