Created attachment 3605 [details] Make rekey interval less predictable. This patch sync's OpenSSH compat arc4random with the one in OpenBSD.
Created attachment 3606 [details] Make rekey interval less predictable.
We should probably resync all of the changes from OpenBSD, but it'll need to be done carefully.
Created attachment 3607 [details] Factor out getrnd() into its own file and rename to getentropy() Step 1: factor out getentropy equivalent code into its own file.
Created attachment 3608 [details] Split arc4random_uniform out into its own file. This matches the file currently in OpenBSD. It also changes the types from u_int32_t to uint32_t which happened in OpenBSD's arc4random.c rev 1.40.
Created attachment 3609 [details] Resync arc4random with OpenBSD rev 1.58 Step 3: resync remaining changes. The arc4random.h is taken from LibreSSL with some simplifications (most of the platform specific code is the same with the exception of thread support, however we don't support that.) (Also marking patch 3607 as obsolete as it's gone in.)
Comment on attachment 3609 [details] Resync arc4random with OpenBSD rev 1.58 >--- a/openbsd-compat/arc4random.c >+++ b/openbsd-compat/arc4random.c ... > /* > * If we are providing arc4random, then we can provide a more efficient whitespace at EOL here
The full resync of arc4random went is as https://github.com/openssh/openssh-portable/commit/ce39e7d8b70c4726defde5d3bc4cb7d40d131153 This greatly reduces the diff of portable vs openbsd.
Closing bugs from openssh-9.1 release cycle