segfault on kea-dhcp4 shutdown after startup fails if hook libraries are also loaded
If Kea fails to start up, for some types of failures, if certain hook libraries, minimum of 2, are loaded, on its way to shutdown the server, which is a viable action, because the config is invalid, it reliably segfaults.
Criteria:
- one of the hook libraries does some sort of IO-related actions on startup (I want to say that it posts on an IO service, but want not to make any assumptions at the same time)
- the startup failure has to be IO-related
For example, if we attempt to start kea-dhcp4
with libdhcp_bootp.so
(random library, but not all will do, can be replaced by e.g. libdhcp_mysql_cb.so
) and libdhcp_ping_check.so
(IO-related library, can be replaced by e.g. libdhcp_radius.so
), with a lease-database
configured with retry-on-startup
enabled pointing to a database that is not accessible e.g. turned off (this is the fail trigger), kea-dhcp4
empirically segfaults 100% of the time.
-
kea-dhcp4.conf - the
loggers
entry is not required, it is there for debugging purposes. - kea-dhcp4.log
- backtrace.txt
Interestingly, I was not able to crash kea-dhcp6
the same way or any other way.