mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 15:05:23 +00:00
Process canceled/shut down results in validate_dnskey_dsset_done()
When a validator is already shut down, val->name becomes NULL. We need to process and keep the ISC_R_CANCELED or ISC_R_SHUTTINGDOWN result code before calling validate_async_done(), otherwise, when it is called with the hardcoded DNS_R_NOVALIDSIG result code, it can cause an assetion failure when val->name (being NULL) is used in proveunsecure().
This commit is contained in:
@@ -1952,15 +1952,26 @@ get_dsset(dns_validator_t *val, dns_name_t *tname, isc_result_t *resp) {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
validate_dnskey_dsset_done(dns_validator_t *val, isc_result_t result) {
|
validate_dnskey_dsset_done(dns_validator_t *val, isc_result_t result) {
|
||||||
if (result == ISC_R_SUCCESS) {
|
switch (result) {
|
||||||
|
case ISC_R_CANCELED:
|
||||||
|
case ISC_R_SHUTTINGDOWN:
|
||||||
|
/* Abort, abort, abort! */
|
||||||
|
break;
|
||||||
|
case ISC_R_SUCCESS:
|
||||||
marksecure(val);
|
marksecure(val);
|
||||||
validator_log(val, ISC_LOG_DEBUG(3), "marking as secure (DS)");
|
validator_log(val, ISC_LOG_DEBUG(3), "marking as secure (DS)");
|
||||||
} else if (result == ISC_R_NOMORE && !val->supported_algorithm) {
|
break;
|
||||||
validator_log(val, ISC_LOG_DEBUG(3),
|
case ISC_R_NOMORE:
|
||||||
"no supported algorithm/digest (DS)");
|
if (!val->supported_algorithm) {
|
||||||
result = markanswer(val, "validate_dnskey (3)",
|
validator_log(val, ISC_LOG_DEBUG(3),
|
||||||
"no supported algorithm/digest (DS)");
|
"no supported algorithm/digest (DS)");
|
||||||
} else {
|
result = markanswer(
|
||||||
|
val, "validate_dnskey (3)",
|
||||||
|
"no supported algorithm/digest (DS)");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
FALLTHROUGH;
|
||||||
|
default:
|
||||||
validator_log(val, ISC_LOG_INFO,
|
validator_log(val, ISC_LOG_INFO,
|
||||||
"no valid signature found (DS)");
|
"no valid signature found (DS)");
|
||||||
result = DNS_R_NOVALIDSIG;
|
result = DNS_R_NOVALIDSIG;
|
||||||
|
Reference in New Issue
Block a user