]> git.ipfire.org Git - thirdparty/bind9.git/commit
Use cryptographically-secure pseudo-random generator everywhere
authorOndřej Surý <ondrej@isc.org>
Tue, 19 Aug 2025 17:22:18 +0000 (19:22 +0200)
committerMichał Kępień <michal@isc.org>
Thu, 2 Oct 2025 11:53:14 +0000 (13:53 +0200)
commit8330b49fb90bfeae14b47b7983e9459cc2bbaffe
tree7eb49c0ade47f79c861034273bdf4317993a4a50
parent4c99ba5a462d01aa88a5d975e82550df53228000
Use cryptographically-secure pseudo-random generator everywhere

It was discovered in an upcoming academic paper that a xoshiro128**
internal state can be recovered by an external 3rd party allowing to
predict UDP ports and DNS IDs in the outgoing queries.  This could lead
to an attacker spoofing the DNS answers with great efficiency and
poisoning the DNS cache.

Change the internal random generator to system CSPRNG with buffering to
avoid excessive syscalls.

Thanks Omer Ben Simhon and Amit Klein of Hebrew University of Jerusalem
for responsibly reporting this to us.  Very cool research!

(cherry picked from commit cffcab9d5f3e709002f331b72498fcc229786ae2)
lib/isc/include/isc/random.h
lib/isc/random.c
tests/isc/random_test.c