Make QUIC insecure randomness thread-safe

cl/358886449 accidentally causes undefined behavior by introducing insecure randomness in a thread-unsafe way, even though QuicRandom is expected to be thread-safe. This CL switches the random number generator state to thread_local storage to avoid the issue. This is slightly slower than before, but still 100x faster than secure randomness. This CL replaces the feature flag to ensure the thread-unsafe code does not get enabled.

Protected by FLAGS_quic_reloadable_flag_quic_stateless_reset_faster_random.

PiperOrigin-RevId: 358941810
Change-Id: Ie00942a0fad3f459a9eeff1a32a34af73da7f5d0
4 files changed
tree: 8a6e9f6611ebaaf3afc2ba5d92a8a40d238baeaa
  1. common/
  2. epoll_server/
  3. http2/
  4. quic/
  5. spdy/
  6. CONTRIBUTING.md
  7. LICENSE
  8. README.md
README.md

QUICHE

QUICHE (QUIC, Http/2, Etc) is Google‘s implementation of QUIC and related protocols. It powers Chromium as well as Google’s QUIC servers and some other projects. QUICHE is only supported on little-endian platforms.

Code can be viewed in CodeSearch in Quiche and is imported into Chromium.