mirror_frr/staticd
Donald Sharp a46e6f88f4 staticd: Tell bfd that we are shutting down
Prevent a use after free and tell the bfd subsystem
we are shutting down in staticd.

./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460:==2264460==ERROR: AddressSanitizer: heap-use-after-free on address 0x61f000004698 at pc 0x7f65d1eb11b2 bp 0x7ffdbface490 sp 0x7ffdbface488
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-READ of size 4 at 0x61f000004698 thread T0
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #0 0x7f65d1eb11b1 in zclient_bfd_command lib/bfd.c:307
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #1 0x7f65d1eb20f5 in _bfd_sess_send lib/bfd.c:507
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #2 0x7f65d20510aa in thread_call lib/thread.c:1989
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #3 0x7f65d2051f0a in _thread_execute lib/thread.c:2081
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #4 0x7f65d1eb271b in _bfd_sess_remove lib/bfd.c:544
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #5 0x7f65d1eb278d in bfd_sess_free lib/bfd.c:553
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #6 0x7f65d1eb5400 in bfd_protocol_integration_finish lib/bfd.c:1029
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #7 0x7f65d1f42f77 in hook_call_frr_fini lib/libfrr.c:41
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #8 0x7f65d1f494a1 in frr_fini lib/libfrr.c:1199
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #9 0x563b7abefd76 in sigint staticd/static_main.c:70
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #10 0x7f65d200ef91 in frr_sigevent_process lib/sigevent.c:115
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #11 0x7f65d204fac6 in thread_fetch lib/thread.c:1758
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #12 0x7f65d1f49377 in frr_run lib/libfrr.c:1184
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #13 0x563b7abefed1 in main staticd/static_main.c:160
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #14 0x7f65d1b92d09 in __libc_start_main ../csu/libc-start.c:308
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-    #15 0x563b7abefa99 in _start (/usr/lib/frr/staticd+0x15a99)
./bfd_topo3.test_bfd_topo3/r4.staticd.asan.2264460-

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 7a185ac85e)
2023-03-21 19:37:52 +00:00
..
.gitignore staticd: Start the addition of a staticd 2018-07-29 12:37:24 -04:00
Makefile staticd: Start the addition of a staticd 2018-07-29 12:37:24 -04:00
static_bfd.c staticd: add debug static bfd command 2023-01-13 15:32:12 -03:00
static_debug.c staticd: add debug static bfd command 2023-01-13 15:32:12 -03:00
static_debug.h staticd: add debug static bfd command 2023-01-13 15:32:12 -03:00
static_main.c staticd: Tell bfd that we are shutting down 2023-03-21 19:37:52 +00:00
static_nb_config.c staticd: BFD integration northbound support 2023-01-13 15:32:12 -03:00
static_nb.c staticd: BFD integration northbound support 2023-01-13 15:32:12 -03:00
static_nb.h staticd: BFD integration northbound support 2023-01-13 15:32:12 -03:00
static_nht.c staticd: track nexthops per-SAFI 2022-03-27 14:57:22 +02:00
static_nht.h staticd: track nexthops per-SAFI 2022-03-27 14:57:22 +02:00
static_routes.c staticd: fix bug on route reinstallation 2023-01-13 15:32:12 -03:00
static_routes.h staticd: add command to show monitored routes 2023-01-13 15:32:12 -03:00
static_vrf.c *: rework renaming the default VRF 2021-12-21 22:09:29 +03:00
static_vrf.h *: cleanup ifp->vrf_id 2021-11-22 20:47:23 +03:00
static_vty.c *: fix non-const northbound XPath format strings 2023-01-27 12:01:20 +01:00
static_vty.h lib: northbound cli show/cmd functions must not modify data nodes 2021-10-13 20:12:35 +03:00
static_zebra.c lib: remove concurrent nexthop zapi (un)registration 2023-01-24 16:08:26 +01:00
static_zebra.h staticd: merge NHT register & update, reorganize 2022-04-24 17:19:47 +02:00
subdir.am staticd: BFD integration northbound support 2023-01-13 15:32:12 -03:00