]> git.ipfire.org Git - thirdparty/bind9.git/commit
Use a keyed hash for the RRL bucket table
authorOndřej Surý <ondrej@isc.org>
Wed, 29 Apr 2026 16:20:03 +0000 (18:20 +0200)
committerOndřej Surý <ondrej@sury.org>
Mon, 4 May 2026 14:17:39 +0000 (16:17 +0200)
commit8c67fc2b4d9be4f637b3309c8eabd05e1982af1a
tree63b6222482c6ab7924eb06d4a513d6d4b5235dd0
parent0a84d25577bfb576548732541043958aada7ddcb
Use a keyed hash for the RRL bucket table

The previous hash_key() was a deterministic, unkeyed (<<1) + add over the
key words.  An off-path attacker could invert it offline and submit
queries whose source /24, qname hash, and qtype map to a single bucket;
under chaining this turns every lookup into an O(N) walk under
rrl->lock and starves legitimate query processing on the very feature
deployed to mitigate DoS.

Replace it with isc_hash32(), which is HalfSipHash-2-4 keyed by a
per-process random seed, so collision sets cannot be precomputed.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit a6b7ce29c4cfab2ab1d46f48f21f531d5ffde942)
lib/dns/rrl.c