[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] bug? arc4_seed_proc_sys_kernel_random_uuid() does not set arc4_seeded_ok on success
Hi there,
There may be a bug in the arc4 rng implementation--
arc4_seed_proc_sys_kernel_random_uuid() does not set arc4_seeded_ok on
success. All other arc4_seed_* functions finish by setting arc4_seeded_ok.
This means arc4_stir() and arc4random_stir() _could_ return -1 (failure)
when they're not supposed to.
Here's a diff where I've commented on the missing line.
diff --git a/arc4random.c b/arc4random.c
index 9549751..f8825c0 100644
--- a/arc4random.c
+++ b/arc4random.c
@@ -287,6 +287,7 @@ arc4_seed_proc_sys_kernel_random_uuid(void)
}
memset(entropy, 0, sizeof(entropy));
memset(buf, 0, sizeof(buf));
+ /* Possible bug, missing arc4_seeded_ok = 1 */
return 0;
}
#endif
AFAIK this is a bug. Could someone please confirm?
Many thanks,
*Joe
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.