Hello,
I tried the following with an unbound build from the current master.
If I have auth-zone configured and I start and stop the service in a short period of time, segfault happens.
The reason is that env variable is NULL on services/authzone.c:6394.
if(env->outnet->want_to_quit) {.
It happens because of the daemon_cleanup function in daemon/daemon.c calls auth_zones_cleanup function, which calls xfr_probe_disown, which has the following code xfr->task_probe->env = NULL;
After that, worker_delete is called, which does a chain of calls ending up in mesh_state_cleanup function (services/mesh.c:861), which iterates through callback list and calls callbacks themselves. One of those callbacks is auth_xfer_probe_lookup_callback (services/authzone.c:6385) which doesn't expect env to be NULL
The possible solution would be to change 'if' statement on services/authzone.c:6394 to look something like if(env && env->outnet->want_to_quit) {.
However I'm not sure if suggested solution satisfies application logic.
Hello,
I tried the following with an unbound build from the current master.
If I have auth-zone configured and I start and stop the service in a short period of time, segfault happens.
The reason is that
envvariable isNULLon services/authzone.c:6394.if(env->outnet->want_to_quit) {.It happens because of the
daemon_cleanupfunction in daemon/daemon.c callsauth_zones_cleanupfunction, which callsxfr_probe_disown, which has the following codexfr->task_probe->env = NULL;After that,
worker_deleteis called, which does a chain of calls ending up inmesh_state_cleanupfunction (services/mesh.c:861), which iterates through callback list and calls callbacks themselves. One of those callbacks isauth_xfer_probe_lookup_callback(services/authzone.c:6385) which doesn't expectenvto beNULLThe possible solution would be to change 'if' statement on services/authzone.c:6394 to look something like
if(env && env->outnet->want_to_quit) {.However I'm not sure if suggested solution satisfies application logic.