]> 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:26:07 +0000 (13:26 +0200)
commitcffcab9d5f3e709002f331b72498fcc229786ae2
tree3508eabb112b1ef1c0e39ab41d33b2a0fae84330
parent7b95c382dbd6b016d11ab3c7d547a3e17153d065
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!
lib/isc/include/isc/random.h
lib/isc/random.c
tests/isc/random_test.c