mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 21:47:59 +00:00
4210. [cleanup] Silence use after free false positive. [RT #40743]
This commit is contained in:
parent
7b1f63dcd1
commit
f43e5c8ed2
2
CHANGES
2
CHANGES
@ -1,3 +1,5 @@
|
|||||||
|
4210. [cleanup] Silence use after free false positive. [RT #40743]
|
||||||
|
|
||||||
4209. [bug] Address resource leaks in dlz modules. [RT #40654]
|
4209. [bug] Address resource leaks in dlz modules. [RT #40654]
|
||||||
|
|
||||||
4208. [bug] Address null pointer dereferences on out of memory.
|
4208. [bug] Address null pointer dereferences on out of memory.
|
||||||
|
@ -1289,6 +1289,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||||||
* it must be the first OPT we've seen.
|
* it must be the first OPT we've seen.
|
||||||
*/
|
*/
|
||||||
if (!dns_name_equal(dns_rootname, name) ||
|
if (!dns_name_equal(dns_rootname, name) ||
|
||||||
|
sectionid != DNS_SECTION_ADDITIONAL ||
|
||||||
msg->opt != NULL)
|
msg->opt != NULL)
|
||||||
DO_FORMERR;
|
DO_FORMERR;
|
||||||
skip_name_search = ISC_TRUE;
|
skip_name_search = ISC_TRUE;
|
||||||
@ -1526,9 +1527,12 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||||||
ISC_LIST_APPEND(rdatalist->rdata, rdata, link);
|
ISC_LIST_APPEND(rdatalist->rdata, rdata, link);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If this is an OPT record, remember it. Also, set
|
* If this is an OPT, SIG(0) or TSIG record, remember it.
|
||||||
* the extended rcode. Note that msg->opt will only be set
|
* Also, set the extended rcode for TSIG.
|
||||||
* if best-effort parsing is enabled.
|
*
|
||||||
|
* Note msg->opt, msg->sig0 and msg->tsig will only be
|
||||||
|
* already set if best-effort parsing is enabled otherwise
|
||||||
|
* there will only be at most one of each.
|
||||||
*/
|
*/
|
||||||
if (rdtype == dns_rdatatype_opt && msg->opt == NULL) {
|
if (rdtype == dns_rdatatype_opt && msg->opt == NULL) {
|
||||||
dns_rcode_t ercode;
|
dns_rcode_t ercode;
|
||||||
@ -1542,14 +1546,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||||||
msg->rcode |= ercode;
|
msg->rcode |= ercode;
|
||||||
isc_mempool_put(msg->namepool, name);
|
isc_mempool_put(msg->namepool, name);
|
||||||
free_name = ISC_FALSE;
|
free_name = ISC_FALSE;
|
||||||
}
|
} else if (issigzero && msg->sig0 == NULL) {
|
||||||
|
|
||||||
/*
|
|
||||||
* If this is an SIG(0) or TSIG record, remember it. Note
|
|
||||||
* that msg->sig0 or msg->tsig will only be set if best-effort
|
|
||||||
* parsing is enabled.
|
|
||||||
*/
|
|
||||||
if (issigzero && msg->sig0 == NULL) {
|
|
||||||
msg->sig0 = rdataset;
|
msg->sig0 = rdataset;
|
||||||
msg->sig0name = name;
|
msg->sig0name = name;
|
||||||
rdataset = NULL;
|
rdataset = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user