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

rand: stop detecting /dev/urandom in cross-builds #9038

Closed
wants to merge 1 commit into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Jun 22, 2022

  • Prevent CMake to auto-detect /dev/urandom when cross-building.
    Before this patch, it would detect it in a cross-build scenario on *nix
    hosts with this device present. This was a problem for example with
    Windows builds, but it could affect any target system with this device
    missing. This also syncs detection behaviour with autotools, which also
    skips it for cross-builds.
  • Also, make sure to never use the file RANDOM_FILE as entropy for libcurl's
    fallback random number generator on Windows. Windows does not have the
    concept of reading a random stream from a filename, nor any guaranteed
    non-world-writable path on disk. With this, a manual misconfiguration or
    an overeager auto-detection can no longer result in a user-controllable
    seed source.

Closes #xxxx


Split off the easy (and urgent) part of #9027 into this new PR, so that we
can merge it before the release.

- Prevent CMake to auto-detect /dev/urandom when cross-building.
  Before this patch, it would detect it in a cross-build scenario on *nix
  hosts with this device present. This was a problem for example with
  Windows builds, but it could affect any target system with this device
  missing. This also syncs detection behaviour with autotools, which also
  skips it for cross-builds.
- Also, make sure to never use the file RANDOM_FILE as entropy for libcurl's
  fallback random number generator on Windows. Windows does not have the
  concept of reading a random stream from a filename, nor any guaranteed
  non-world-writable path on disk. With this, a manual misconfiguration or
  an overeager auto-detection can no longer result in a user-controllable
  seed source.

Closes #xxxx
@vszakats vszakats closed this in 70adb81 Jun 22, 2022
@vszakats vszakats deleted the xdevrandom2 branch June 22, 2022 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants