bind9/bin
Ondřej Surý 11bca1051f
Switch UDP fetches to TCP on the first response with a wrong query id
Until now, the dispatcher silently dropped UDP responses from the
expected peer that carried the wrong DNS message id and kept listening
for the correct id to arrive within the read timeout.  An off-path
attacker who knows the destination address and source port of an
outgoing fetch could exploit that quiet retry window to flood the
resolver with guessed responses; with a gigabit link the per-query
success probability grows linearly with the number of guesses that
arrive before the legitimate answer or the timeout.

Treat any such mismatch as a possible spoofing attempt and let the
resolver immediately retry the same query over TCP, the same control
path the truncation handler already uses.

Add a resolver statistics counter - exposed as 'queries retried over TCP
after a response with mismatched query id' in rndc stats and
'MismatchTCP' in the statistics channel

Assisted-by: Claude:claude-opus-4-7
2026-05-14 15:56:18 +02:00
..
check Resolve ERR_MISSING_GLUE / ERR_EXTRA_AAAA value collision 2026-04-29 17:31:23 +02:00
confgen Size HMAC key generation buffers to the maximum block size 2026-04-29 19:21:20 +02:00
delv Skip detach when delv's client never created 2026-04-30 10:56:11 +02:00
dig Bound EDNS option length in dig's process_opt() walk 2026-05-01 07:19:49 +02:00
dnssec Replace INSIST in KSR DNSKEY parser with a structured error 2026-05-05 21:06:30 +02:00
include Remove NZF support, make LMDB required for new zone storage 2026-03-18 11:02:33 +01:00
named Switch UDP fetches to TCP on the first response with a wrong query id 2026-05-14 15:56:18 +02:00
nsupdate nsupdate does not handle zero length RDATA well 2026-04-09 09:24:47 +10:00
plugins Apply the dns_rdataset_cleanup patch through the codebase 2025-12-17 15:19:55 +01:00
rndc Dump delegation database in 'rndc dumpdb' 2026-03-30 20:41:13 +02:00
tests Switch UDP fetches to TCP on the first response with a wrong query id 2026-05-14 15:56:18 +02:00
tools Remove NZF support, make LMDB required for new zone storage 2026-03-18 11:02:33 +01:00
meson.build replace the build system with meson 2025-06-11 10:30:12 +03:00