Skip to Content [alt-c]

Comment

In reply to Comment by Andrew Ayer

Reader John Spencer on 2014-07-16 at 13:50:

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

Post a Reply

Your comment will be public. If you would like to contact me privately, please email me. Please keep your comment on-topic, polite, and comprehensible.

(Optional; will be published)

(Optional; will not be published)

(Optional; will be published)

  • Blank lines separate paragraphs.
  • Lines starting with ">" are indented as block quotes.
  • Lines starting with two spaces are reproduced verbatim.
  • Text surrounded by *asterisks* is italicized.
  • Text surrounded by `back ticks` is monospaced.
  • URLs are turned into links.
  • Use the Preview button to check your formatting.