summaryrefslogtreecommitdiffstats
path: root/sys/dev/random
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2013-04-19 00:30:52 +0000
committerache <ache@FreeBSD.org>2013-04-19 00:30:52 +0000
commit60f7807df19873ac8b9fce428ca4198735d92067 (patch)
treefa25310a8dd89ca7a6e6ae0ff9bec9876bb60c74 /sys/dev/random
parent1110825468efffa72f05077e3a42f5e5fa6963ec (diff)
downloadFreeBSD-src-60f7807df19873ac8b9fce428ca4198735d92067.zip
FreeBSD-src-60f7807df19873ac8b9fce428ca4198735d92067.tar.gz
Attempt to mitigate poor initialization of arc4 by one-shot
reinitialization from yarrow right after good entropy is harvested. Approved by: secteam (delphij) MFC after: 1 week
Diffstat (limited to 'sys/dev/random')
-rw-r--r--sys/dev/random/randomdev_soft.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/random/randomdev_soft.c b/sys/dev/random/randomdev_soft.c
index 004066eb..1742549 100644
--- a/sys/dev/random/randomdev_soft.c
+++ b/sys/dev/random/randomdev_soft.c
@@ -367,6 +367,8 @@ random_yarrow_unblock(void)
selwakeuppri(&random_systat.rsel, PUSER);
wakeup(&random_systat);
}
+ (void)atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_NONE,
+ ARC4_ENTR_HAVE);
}
static int
OpenPOWER on IntegriCloud