Skip to content

auth-zone section in config may lead to segfault #220

Description

@sibeream

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions