- Fix Unchecked NULL Pointer in dns64_inform_super()

and ipsecmod_new(), reported by X41 D-Sec.
This commit is contained in:
W.C.A. Wijngaards
2019-11-19 15:48:18 +01:00
parent 226298bbd3
commit 2a4e840be4
3 changed files with 9 additions and 1 deletions
+6
View File
@@ -941,6 +941,12 @@ dns64_inform_super(struct module_qstate* qstate, int id,
if(!super_dq) {
super_dq = (struct dns64_qstate*)regional_alloc(super->region,
sizeof(*super_dq));
if(!super_dq) {
log_err("out of memory");
super->return_rcode = LDNS_RCODE_SERVFAIL;
super->return_msg = NULL;
return;
}
super->minfo[id] = super_dq;
memset(super_dq, 0, sizeof(*super_dq));
super_dq->started_no_cache_store = super->no_cache_store;
+2
View File
@@ -5,6 +5,8 @@
- Fixes to please lint checks.
- Fix Integer Overflow in Regional Allocator,
reported by X41 D-Sec.
- Fix Unchecked NULL Pointer in dns64_inform_super()
and ipsecmod_new(), reported by X41 D-Sec.
18 November 2019: Wouter
- In unbound-host use separate variable for get_option to please
+1 -1
View File
@@ -103,11 +103,11 @@ ipsecmod_new(struct module_qstate* qstate, int id)
{
struct ipsecmod_qstate* iq = (struct ipsecmod_qstate*)regional_alloc(
qstate->region, sizeof(struct ipsecmod_qstate));
memset(iq, 0, sizeof(*iq));
qstate->minfo[id] = iq;
if(!iq)
return 0;
/* Initialise it. */
memset(iq, 0, sizeof(*iq));
iq->enabled = qstate->env->cfg->ipsecmod_enabled;
iq->is_whitelisted = ipsecmod_domain_is_whitelisted(
(struct ipsecmod_env*)qstate->env->modinfo[id], qstate->qinfo.qname,