svn commit: r239569 - head/etc/rc.d
David O'Brien
obrien at FreeBSD.org
Thu Sep 6 17:57:48 UTC 2012
On Wed, Sep 05, 2012 at 01:37:15AM +0200, Dag-Erling Smrgrav wrote:
> 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."
...
> echo "Just hit <enter> for fast+insecure startup."
> echo "===================================================="
> sysctl kern.random.sys.seeded=0 2>/dev/null
> read -t ${timeout} junk
> echo "${junk}" `sysctl -a` `date` > /dev/random
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.
...
When we are about to generate a very valuable key, it is preferable
to have what ever extra entropy there is in the PRNG's key.
Therefore, the user can request en explicit reseed of the generator.
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.
--
-- David (obrien at FreeBSD.org)
More information about the freebsd-rc
mailing list