Kea takes a long time to process an invalid configuration file
Using AFL to fuzz Kea4 and Kea6 configuration files - i.e. executing the command
kea-dhcp{4,6} -t <config-file>
... where AFL is creating fuzzed configuration files, a number of instances were encountered where the program took an unusually long time to process the file and report errors. A tarball containing two such files (one for Kea4 and one for Kea6) is attached. Elapsed times for processing these files on two ISC systems were:
perf-c2
kea4-hang.conf: > 20s
kea6-hang.conf: > 74s
Version information:
1.5.0-git
git 958abe50
linked with:
log4cplus 1.1.3
OpenSSL 1.0.2k-fips 26 Jan 2017
database:
Memfile backend 2.1
2017 Macbook Pro
kea4-hang.conf: > 5s
kea6-hang.conf > 17s
Version information:
1.5.0-git
git 958abe50
linked with:
log4cplus 2.0.2
OpenSSL 1.0.2r 26 Feb 2019
database:
Memfile backend 2.1
Admittedly the corrupt files are quite large (the Kea6 file is over 300kB), but the time to process them does seem unusually long.