]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: Fix for ain->attr corruption during path update 13338/head
authorPooja Jagadeesh Doijode <pdoijode@nvidia.com>
Wed, 19 Apr 2023 01:40:06 +0000 (18:40 -0700)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Wed, 19 Apr 2023 18:49:16 +0000 (18:49 +0000)
commitea004fb1f3a8f9e675546768725823a3f5c7de05
tree5e3f09ffa7c3bcc38653e757fd720234f6adfb95
parent165ed0bf893f5c50be21fc3aa20457ac19417332
bgpd: Fix for ain->attr corruption during path update

1. Consider a established L2VPN EVPN BGP peer with soft-reconfiguartion
   inbound configured

2. When the interface of this directly connected BGP peer is shutdown,
   bgp_soft_reconfig_table_update() is called, which memsets the evpn buffer
   and calls bgp_update() with received attributes stored in ain table(ain->attr).
   In bgp_update(), evpn_overlay attribute in ain->attr (which is an interned
   attr) was modified by doing a memcpy

3. Above action causes 2 attributes in the attrhash (which were previously different)
   to match!

4. Later during fsm change event of the peer, bgp_adj_in_remove() is called
   to clean up the ain->attr. But, because 2 attrs in attrhash match, it causes
   BGP to assert in bgp_attr_unintern()

Signed-off-by: Pooja Jagadeesh Doijode <pdoijode@nvidia.com>
(cherry picked from commit 6e076ba5231cba2e22dcbdc48a9c13df046a2e47)
bgpd/bgp_route.c