Merge pull request #2814 from qlyoung/fix-ospf6d-lsa-uaf-test

ospf6d: fix use after free on LSA
This commit is contained in:
David Lamparter 2018-08-20 18:16:46 +02:00 committed by GitHub
commit a55a8b4538
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -330,6 +330,8 @@ void ospf6_flood_interface(struct ospf6_neighbor *from, struct ospf6_lsa *lsa,
zlog_debug(
"Requesting the same, remove it, next neighbor");
if (req == on->last_ls_req) {
/* sanity check refcount */
assert(req->lock >= 2);
ospf6_lsa_unlock(req);
on->last_ls_req = NULL;
}