Skip to Content [alt-c]
In reply to Comment by Andrew Ayer
it's not just a missing /dev/urandom, but also resource exhaustion (for example out-of-fd's) than can cause open("/dev/urandom", ...) to fail. an attacker may find ways to make your application run out of fds (for example by creating many connections).
aborting the program from a library however is very bad and precludes usage of said library in a robust application. they should rather just return an error code when getentropy() fails, so the library user can handle the error gracefully (and if he doesn't check the return value, it's neither the library's fault nor responsibility). doing an abort/kill is only acceptable if the API is misdesigned in a way that prevents checking for such an error.
Reply
Your comment will be public. To contact me privately, email me. Please keep your comment polite, on-topic, and comprehensible. Your comment may be held for moderation before being published.
Your Name: (Optional; will be published)
Your Email Address: (Optional; will not be published)
Your Website: (Optional; will be published)
>
monospaced
Post a Reply
Your comment will be public. To contact me privately, email me. Please keep your comment polite, on-topic, and comprehensible. Your comment may be held for moderation before being published.