Skip to content

File descriptor leak of random devices in 1.1.1-pre9 #7022

@bwelling

Description

@bwelling

This is new in -pre9, and is related to the persistent random device changes.

On shutdown, OPENSSL_cleanup() calls rand_cleanup_int(), which calls rand_pool_cleanup() followed by RAND_set_rand_method(NULL).

If nothing has ever used random numbers before, the
rand_pool_cleanup() call does nothing, as there's nothing to clean up, but the RAND_set_rand_method(NULL) call will then execute the RUN_ONCE(&rand_init, do_rand_init), as it's never been called before, which will open the random devices. Nothing will ever close them, as rand_pool_cleanup() has already been called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions