]> git.puffer.fish Git - mirror/frr.git/commit
ospfd: Function order caused use after free. 5310/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 11 Nov 2019 15:17:31 +0000 (10:17 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 11 Nov 2019 15:17:31 +0000 (10:17 -0500)
commitae82bb756b6d6c49b8e8f371b6b7b4f1ad1c8aad
treed3992ac78be66bbe856f685983d429ef40f07d85
parenta5f271c6352a278856c8aa453d78c1dd65ca2638
ospfd: Function order caused use after free.

The opaque lsa that we are storing is stored on various
lists depending on it's type.  This removal from the
list was being done *after* the pointer was freed.  This
is not a good idea.  Since the use after free was just
removal from a linked list and the freeing function does
not do anything other than free data, than just switching the function
order should be sufficient.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
ospfd/ospf_opaque.c