On 11/19/26 12:15 PM, Aaron Conole wrote: > The userspace conntrack implementation currently derives its hash basis > and selects tuples using a xorshift-based PRNG. This generator is > predictable given enough observed outputs, which allows an attacker to > infer the internal seed details, and by extension, predict future values. > For a NAT implementation this is frequently exposed to untrusted networks, > this is not an acceptable entropy source. > > This series introduces a new CSPRNG so that the hash-basis and tuple > selection can draw from an appropriately secure entropy stream. The > implementation includes two backends: > > 1. An internally maintained ChaCha20 stream cipher which conforms > to RFC 8439, that draws from the global entropy pool and uses > that to build a stream of bytes. This is for instances where > openvswitch is built without OpenSSL available. > > 2. An OpenSSL EVP backend (preferred) that uses the EVP stream > cipher framework to generate a ChaCha20 stream instead. > > Internal benchmarking was compared across the following: > > a. get_entropy_or_die() / uint32 > b. get_entropy_or_die() / stream block > c. openssl evp > d. internal implementation of chacha20 > d. openssl rand_bytes > > The microbenchmarking code originally showed get_entropy_or_die() performing > at the same level as an internal implementation - however, that may be due to > the translation unit having all implementation details available. After > porting it to openvswitch random.c, the internal implementation of chacha20 > was 30% faster. > > v2->v3: > * Addressed AI concerns in each patch. > > v3->v4: > * Addressed review comments from Ilya Maximets and Rosemarie > O'Riorden: configure-time detection of EVP_chacha20, fixed the > endian detection probe, unconditional request-size guard, fresh > entropy seeding when falling back from a mid-stream EVP failure, > fork() documentation, comment and commit message clarifications, > and a new refill / rekey selftest. > > v4->v5: > * Addressed review comments from Eelco; whitespace and comment > format issues. ovs_assert() instead of bare test. Document > only the lowest acceptable value. This version breaks a lot of tests hitting the new assertions. Making as changes-requested.
Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
