看板 FB_security 關於我們 聯絡資訊
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@FreeBSD.org) _______________________________________________ freebsd-security@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-security To unsubscribe, send any mail to "freebsd-security-unsubscribe@freebsd.org"