From 60f7807df19873ac8b9fce428ca4198735d92067 Mon Sep 17 00:00:00 2001 From: ache Date: Fri, 19 Apr 2013 00:30:52 +0000 Subject: 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 --- sys/dev/random/randomdev_soft.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/dev/random') 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 -- cgit v1.1