From 7570eeb2d1ad4cc4447f0b30841c8c13484892e2 Mon Sep 17 00:00:00 2001 From: Rodrigo Nardi Date: Mon, 26 Jun 2023 07:23:46 -0300 Subject: [PATCH 1/3] bgp: Using variable after free --- bgpd/bgp_bfd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c index d1ddfd0460..23c6ee3587 100644 --- a/bgpd/bgp_bfd.c +++ b/bgpd/bgp_bfd.c @@ -320,8 +320,10 @@ static void bgp_peer_remove_bfd(struct peer *p) return; } - if (p->bfd_config) - bfd_sess_free(&p->bfd_config->session); + if (p->bfd_config) { + bfd_sess_free(&p->bfd_config->session); + p->bfd_config->manual = false; + } XFREE(MTYPE_BFD_CONFIG, p->bfd_config); } From 72b072356872938cc1e3ba8dafae40950c46cb07 Mon Sep 17 00:00:00 2001 From: Rodrigo Nardi Date: Mon, 26 Jun 2023 07:26:23 -0300 Subject: [PATCH 2/3] bgp: Using variable after free --- bgpd/bgp_bfd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c index 23c6ee3587..21ee505cdb 100644 --- a/bgpd/bgp_bfd.c +++ b/bgpd/bgp_bfd.c @@ -320,10 +320,8 @@ static void bgp_peer_remove_bfd(struct peer *p) return; } - if (p->bfd_config) { + if (p->bfd_config) bfd_sess_free(&p->bfd_config->session); - p->bfd_config->manual = false; - } XFREE(MTYPE_BFD_CONFIG, p->bfd_config); } From a35fbb34807efb5b8176653cf0f617b9639f59af Mon Sep 17 00:00:00 2001 From: Martin Winter Date: Mon, 25 Sep 2023 11:29:10 +0200 Subject: [PATCH 3/3] tests: all_protocol_startup: break BGP with wrong AS for github check test Signed-off-by: Martin Winter --- tests/topotests/all_protocol_startup/r1/bgpd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/topotests/all_protocol_startup/r1/bgpd.conf b/tests/topotests/all_protocol_startup/r1/bgpd.conf index 32dcb727e5..f08ed76996 100644 --- a/tests/topotests/all_protocol_startup/r1/bgpd.conf +++ b/tests/topotests/all_protocol_startup/r1/bgpd.conf @@ -1,7 +1,7 @@ log file bgpd.log ! ! -router bgp 100 +router bgp 102 bgp router-id 192.168.0.1 bgp log-neighbor-changes no bgp ebgp-requires-policy