4406. [bug] getrrsetbyname with a non absolute name could
trigger a infinite recursion bug in lwresd
and named with lwres configured if when combined
with a search list entry the resulting name is
too long. [RT #42694]
(cherry picked from commit 38cc2d14e2)
This commit is contained in:
@@ -403,14 +403,18 @@ start_lookup(ns_lwdclient_t *client) {
|
||||
INSIST(client->lookup == NULL);
|
||||
|
||||
dns_fixedname_init(&absname);
|
||||
result = ns_lwsearchctx_current(&client->searchctx,
|
||||
dns_fixedname_name(&absname));
|
||||
|
||||
/*
|
||||
* This will return failure if relative name + suffix is too long.
|
||||
* In this case, just go on to the next entry in the search path.
|
||||
* Perform search across all search domains until success
|
||||
* is returned. Return in case of failure.
|
||||
*/
|
||||
if (result != ISC_R_SUCCESS)
|
||||
start_lookup(client);
|
||||
while (ns_lwsearchctx_current(&client->searchctx,
|
||||
dns_fixedname_name(&absname)) != ISC_R_SUCCESS) {
|
||||
if (ns_lwsearchctx_next(&client->searchctx) != ISC_R_SUCCESS) {
|
||||
ns_lwdclient_errorpktsend(client, LWRES_R_FAILURE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
result = dns_lookup_create(cm->mctx,
|
||||
dns_fixedname_name(&absname),
|
||||
|
||||
Reference in New Issue
Block a user