]> git.puffer.fish Git - matthieu/frr.git/commit
ospfd: Prevent use after free( and crash of ospf ) when no router ospf
authorDonald Sharp <sharpd@nvidia.com>
Wed, 30 Aug 2023 14:33:29 +0000 (10:33 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Wed, 30 Aug 2023 14:33:29 +0000 (10:33 -0400)
commit530be6a4d089600f1028439ddec420ef651b983b
tree66630268b655c45166fd89d5847385dd0e7d040f
parent6ed47401a7df973fad8e007005ce85bf8d491232
ospfd: Prevent use after free( and crash of ospf ) when no router ospf

Consider this config:

router ospf
  redistribute kernel

Then you issue:

no router ospf

ospf will crash with a use after free.

The problem is that the event's associated with the
ospf pointer were shut off then the ospf_external_delete
was called which rescheduled the event.  Let's just move
event deletion to the end of the no router ospf.

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