mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
Repeatedly querying for nonexistant data could lead to a crash.
This commit is contained in:
@@ -683,6 +683,7 @@ get_key(dns_validator_t *val, dns_rdata_sig_t *siginfo) {
|
|||||||
/*
|
/*
|
||||||
* We have an rrset for the given keyname.
|
* We have an rrset for the given keyname.
|
||||||
*/
|
*/
|
||||||
|
val->keyset = &val->frdataset;
|
||||||
if (val->frdataset.trust == dns_trust_pending &&
|
if (val->frdataset.trust == dns_trust_pending &&
|
||||||
dns_rdataset_isassociated(&val->fsigrdataset))
|
dns_rdataset_isassociated(&val->fsigrdataset))
|
||||||
{
|
{
|
||||||
@@ -723,7 +724,7 @@ get_key(dns_validator_t *val, dns_rdata_sig_t *siginfo) {
|
|||||||
validator_log(val, ISC_LOG_DEBUG(3),
|
validator_log(val, ISC_LOG_DEBUG(3),
|
||||||
"keyset with trust %d",
|
"keyset with trust %d",
|
||||||
val->frdataset.trust);
|
val->frdataset.trust);
|
||||||
result = get_dst_key(val, siginfo, &val->frdataset);
|
result = get_dst_key(val, siginfo, val->keyset);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
/*
|
/*
|
||||||
* Either the key we're looking for is not
|
* Either the key we're looking for is not
|
||||||
@@ -762,7 +763,8 @@ get_key(dns_validator_t *val, dns_rdata_sig_t *siginfo) {
|
|||||||
result = DNS_R_CONTINUE;
|
result = DNS_R_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dns_rdataset_isassociated(&val->frdataset))
|
if (dns_rdataset_isassociated(&val->frdataset) &&
|
||||||
|
val->keyset != &val->frdataset)
|
||||||
dns_rdataset_disassociate(&val->frdataset);
|
dns_rdataset_disassociate(&val->frdataset);
|
||||||
if (dns_rdataset_isassociated(&val->fsigrdataset))
|
if (dns_rdataset_isassociated(&val->fsigrdataset))
|
||||||
dns_rdataset_disassociate(&val->fsigrdataset);
|
dns_rdataset_disassociate(&val->fsigrdataset);
|
||||||
|
Reference in New Issue
Block a user