bind9/bin/tests
Aram Sargsyan 3ad0f165ab Fix RRL responses-per-second bypass using wildcard names
It is possible to bypass Response Rate Limiting (RRL)
`responses-per-second` limitation using specially crafted wildcard
names, because the current implementation, when encountering a found
DNS name generated from a wildcard record, just strips the leftmost
label of the name before making a key for the bucket.

While that technique helps with limiting random requests like
<random>.example.com (because all those requests will be accounted
as belonging to a bucket constructed from "example.com" name), it does
not help with random names like subdomain.<random>.example.com.

The best solution would have been to strip not just the leftmost
label, but as many labels as necessary until reaching the suffix part
of the wildcard record from which the found name is generated, however,
we do not have that information readily available in the context of RRL
processing code.

Fix the issue by interpreting all valid wildcard domain names as
the zone's origin name concatenated to the "*" name, so they all will
be put into the same bucket.

(cherry picked from commit baa9698c9d)
2022-09-08 09:41:15 +02:00
..
bigtest Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
optional Remove use of the inline keyword used as suggestion to compiler 2022-03-25 09:37:18 +01:00
pkcs11 Add couple missing braces around single-line statements 2022-03-17 18:31:36 +01:00
startperf Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
system Fix RRL responses-per-second bypass using wildcard names 2022-09-08 09:41:15 +02:00
testdata/wire move all optional tests from bin/tests to bin/tests/optional 2018-03-09 14:12:47 -08:00
win32 Add libssl libraries to Windows build 2020-12-09 10:46:16 +01:00
.gitignore Remove genrandom command and all usage of specific random files throughout the system test suite 2018-05-16 09:54:35 +02:00
cfg_test.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
headerdep_test.sh.in Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
Makefile.in Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
makejournal.c Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
named.conf Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
prepare-softhsm2.sh Update the copyright information in all files in the repository 2022-01-11 12:22:09 +01:00
wire_test.c Remove UNREACHABLE() statements after exit() 2022-03-25 10:08:39 +01:00