]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospfd: cancel SR thread at shutdown
authorQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 6 Mar 2018 18:42:53 +0000 (13:42 -0500)
committerChristian Franke <chris@opensourcerouting.org>
Wed, 7 Mar 2018 12:31:58 +0000 (13:31 +0100)
Otherwise if it is scheduled the thread pointer will be accessed after
the shutdown task finishes accessing, having deleted the structure that
owns said pointer, which causes a heap UAF.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
ospfd/ospfd.c

index 86a3293d7110bc4987e5ba0fc3438814eeaf2924..eda0fd477312c2bdbb2d7839498d7406aca8e11e 100644 (file)
@@ -704,6 +704,7 @@ static void ospf_finish_final(struct ospf *ospf)
        OSPF_TIMER_OFF(ospf->t_read);
        OSPF_TIMER_OFF(ospf->t_write);
        OSPF_TIMER_OFF(ospf->t_opaque_lsa_self);
+       OSPF_TIMER_OFF(ospf->t_sr_update);
 
        close(ospf->fd);
        stream_free(ospf->ibuf);