Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Research /dev/urandom concurrent access #56

Closed
bernardnormier opened this issue Apr 27, 2018 · 1 comment
Closed

Research /dev/urandom concurrent access #56

bernardnormier opened this issue Apr 27, 2018 · 1 comment
Labels
Milestone

Comments

@bernardnormier
Copy link
Member

We currently assume that concurrent reads of /dev/urandom can return the same bytes, which was true years ago but may not longer be true today.

As a result, we synchronize reads to /dev/urandom (within the same process):
https://github.com/zeroc-ice/ice/blob/v3.7.1/cpp/src/IceUtil/Random.cpp#L31

and also replace 15 random bits in UUIDs by our PID, resulting in only 122 - 15 = 107 random bits, see:
https://github.com/zeroc-ice/ice/blob/v3.7.1/cpp/src/IceUtil/UUID.cpp#L131

We could possibly use instead a C++ Random Number Engine: http://en.cppreference.com/w/cpp/numeric/random

ICE-8843

@pepone pepone added this to the 3.8.0 milestone Nov 9, 2018
@bernardnormier bernardnormier modified the milestones: 3.8.0, Future Dec 15, 2023
@pepone
Copy link
Member

pepone commented Mar 15, 2024

We switched to std::random in #1715

@pepone pepone closed this as completed Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants