]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Restore arc4random() detection dropped in the v9.21.14 merge 12451/head
authorMichal Nowak <mnowak@isc.org>
Thu, 23 Jul 2026 14:47:31 +0000 (16:47 +0200)
committerMichal Nowak <mnowak@isc.org>
Thu, 23 Jul 2026 16:22:06 +0000 (18:22 +0200)
Commit 4db9e5d90e2 ("Use arc4random for CSPRNG when available", part
of the CVE-2025-40780 fix) guarded the arc4random() code paths in
lib/isc/random.h and lib/isc/random.c with HAVE_ARC4RANDOM and added
the corresponding function check to meson.build.  The manual conflict
resolution in merge c2a672bbaef ("Merge tag 'v9.21.14'") kept the code
changes but dropped the meson.build hunk, so HAVE_ARC4RANDOM was never
defined and platforms with arc4random() (macOS and the BSDs) silently
fell back to the internal ChaCha-based CSPRNG.  Restore the check.

Assisted-by: Claude:claude-fable-5
meson.build

index 1cd8d27305f8dfa9b59fa136277c5c99c2530a11..a8981dc06ced4c3187eaaacc0e63d6fd919d7db7 100644 (file)
@@ -548,6 +548,9 @@ foreach fn, header : {
     'sched_getaffinity': '#include <sched.h>',
     'sched_yield': '#include <sched.h>',
 
+    # CSPRNG
+    'arc4random': '#include <stdlib.h>',
+
     # Misc.
     'chroot': '#include <unistd.h>',
     'clock_gettime': '#include <time.h>',