bind9/lib/isc
Ondřej Surý d9b5ef3429
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 cffcab9d5f)
2025-10-22 18:42:48 +02:00
..
include Use cryptographically-secure pseudo-random generator everywhere 2025-10-22 18:42:48 +02:00
netmgr add a trivial wrapper for uv_stream_get_write_queue_size 2024-08-05 10:31:15 +00:00
pthreads Reformat sources with up-to-date clang-format-17 2023-11-13 17:15:55 +01:00
tests Use cryptographically-secure pseudo-random generator everywhere 2025-10-22 18:42:48 +02:00
unix Clang-format header file changes 2024-05-17 16:45:43 -07:00
win32 Clang-format header file changes 2024-05-17 16:45:43 -07:00
.gitignore [master] update gitignore files; use rev-parse to get srcid 2014-06-17 13:49:30 -07:00
aes.c Remove EVP_CIPHER_CTX_new() and EVP_CIPHER_CTX_free() shims 2022-03-02 09:31:50 +00:00
app.c Update sources to Clang 15 formatting 2022-11-29 10:30:34 +01:00
assertions.c Simplify way we tag unreachable code with only ISC_UNREACHABLE() 2022-03-25 09:33:51 +01:00
astack.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
backtrace-emptytbl.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
backtrace.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
base32.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 09:37:18 +01:00
base64.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 09:37:18 +01:00
bind9.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
buffer.c add assertions to isc_buffer macros 2022-09-26 23:48:21 -07:00
bufferlist.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
commandline.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
counter.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
crc64.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
entropy.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
entropy_private.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
error.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
event.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
fsaccess.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
hash.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
heap.c Update sources to Clang 15 formatting 2022-11-29 10:30:34 +01:00
hex.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 09:37:18 +01:00
hmac.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
ht.c Fix case insensitive matching in isc_ht hash table implementation 2024-02-11 11:57:58 +01:00
httpd.c Update sources to Clang 15 formatting 2022-11-29 10:30:34 +01:00
iterated_hash.c Use OpenSSL 1.x SHA_CTX API in isc_iterated_hash() 2023-01-18 23:26:40 +01:00
Kyuafile Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
lex.c Update sources to Clang 15 formatting 2022-11-29 10:30:34 +01:00
lfsr.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 09:37:18 +01:00
lib.c Use OpenSSL 1.x SHA_CTX API in isc_iterated_hash() 2023-01-18 23:26:40 +01:00
lib_p.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
log.c fixed a bug in rolling timestamp logfiles 2023-03-28 10:03:33 +00:00
Makefile.in Add LIBUV_CFLAGS to CLINCLUDE in lib/isc/Makefile.in 2022-05-31 16:43:48 +10:00
managers.c Replace netievent lock-free queue with simple locked queue 2022-05-25 16:01:58 +02:00
md.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
mem.c Check the pointer alignments when deserialising 2023-05-05 07:04:31 +00:00
mem_p.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
mutexblock.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
netaddr.c Update the source code formatting using clang-format-17 2023-10-17 17:56:31 +02:00
netmgr_p.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
netscope.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
nonce.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
openssl_shim.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
openssl_shim.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
parseint.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
pk11.c Update sources to Clang 15 formatting 2022-11-29 10:30:34 +01:00
pk11_result.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
pool.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
portset.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 09:37:18 +01:00
quota.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
radix.c Update sources to Clang 15 formatting 2022-11-29 10:30:34 +01:00
random.c Use cryptographically-secure pseudo-random generator everywhere 2025-10-22 18:42:48 +02:00
ratelimiter.c Don't use reference counting in isc_timer unit 2023-01-19 11:28:10 +01:00
regex.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
region.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
result.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
rwlock.c Unify the int32_t vs int_fast32_t when working with atomic types 2025-04-14 17:40:09 +00:00
safe.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
serial.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
siphash.c Accept 'in=NULL' with 'inlen=0' in isc_{half}siphash24 2023-01-10 18:36:27 +11:00
sockaddr.c Simplify way we tag unreachable code with only ISC_UNREACHABLE() 2022-03-25 09:33:51 +01:00
stats.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
string.c Use strnstr implementation from FreeBSD if not provided by OS 2022-10-04 17:05:18 +11:00
symtab.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 09:37:18 +01:00
task.c Add isc_task_setquantum() and use it for post-init zone loading 2023-01-19 11:28:10 +01:00
task_p.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
taskpool.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
timer.c Unlink the timer event before trying to purge it 2023-01-19 11:28:10 +01:00
timer_p.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
tls.c Remove usage of deprecated ATOMIC_VAR_INIT() macro 2022-03-17 21:44:04 +01:00
tls_p.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
tm.c Add FALLTHROUGH macro for __attribute__((fallthrough)) 2022-03-25 09:30:16 +01:00
trampoline.c dont run isc__trampoline_initialize() in dlopen library 2022-05-15 00:25:32 -07:00
trampoline_p.h Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
url.c Update the source code formatting using clang-format-17 2023-10-17 17:56:31 +02:00
utf8.c Update sources to Clang 15 formatting 2022-11-29 10:30:34 +01:00
version.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
xoshiro128starstar.c Remove use of the inline keyword used as suggestion to compiler 2022-03-25 09:37:18 +01:00