Ensure urandom FD is warmed before zygote fork
We use base::RandUint64 to warm the urandom FD on POSIX, ensuring it's open by the time the zygote forks. This was broken by https://chromium-review.googlesource.com/c/chromium/src/+/2380673 which results in RandUint64 generally not opening urandom. To avoid the issue, this CL explicitly calls base::GetUrandomFD() instead of RandUint64 during pre-zygote init. This way, if RandBytes needs to fall back onto urandom in a sandboxed process, it won't fail. Fixed: 1141593 Change-Id: I36996fafea79170e7c3dddb219695e88b8213033 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2492942Reviewed-by:Chris Palmer <palmer@chromium.org> Commit-Queue: Chris Palmer <palmer@chromium.org> Commit-Queue: Ken Rockot <rockot@google.com> Auto-Submit: Ken Rockot <rockot@google.com> Cr-Commit-Position: refs/heads/master@{#820016}
Showing
Please register or sign in to comment