]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: Pass the right reuse_list when handling it via bgp_reuse_timer thread
authorDonatas Abraitis <donatas@opensourcerouting.org>
Wed, 24 Apr 2024 13:59:25 +0000 (16:59 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Fri, 3 May 2024 06:30:33 +0000 (09:30 +0300)
commit70ac630b399a007ae396eab42217d98638162a71
tree6b4a4c70a7f5529a33ee3b5785572c83a516c3c6
parentf8e6b7ce450f494c88fdddbd8822673579b6d9b4
bgpd: Pass the right reuse_list when handling it via bgp_reuse_timer thread

This fixes the crash:

```
==14759== Invalid read of size 8
==14759==    at 0x31032B: bgp_reuselist_del (bgp_damp.c:51)
==14759==    by 0x310392: bgp_damp_info_unclaim (bgp_damp.c:69)
==14759==    by 0x310CD6: bgp_damp_info_free (bgp_damp.c:387)
==14759==    by 0x311016: bgp_reuse_timer (bgp_damp.c:230)
==14759==    by 0x4F227CC: thread_call (thread.c:2008)
==14759==    by 0x4EDB7D7: frr_run (libfrr.c:1216)
==14759==    by 0x1EF748: main (bgp_main.c:525)
==14759==  Address 0x48 is not stack'd, malloc'd or (recently) free'd
==14759==
==14759==
==14759== Process terminating with default action of signal 11 (SIGSEGV)
==14759==    at 0x59CC7F5: raise (raise.c:46)
==14759==    by 0x4F10CEB: core_handler (sigevent.c:261)
==14759==    by 0x59CC97F: ??? (in /lib/x86_64-linux-gnu/libpthread-2.27.so)
==14759==    by 0x31032A: bgp_reuselist_del (bgp_damp.c:51)
==14759==    by 0x310392: bgp_damp_info_unclaim (bgp_damp.c:69)
==14759==    by 0x310CD6: bgp_damp_info_free (bgp_damp.c:387)
==14759==    by 0x311016: bgp_reuse_timer (bgp_damp.c:230)
==14759==    by 0x4F227CC: thread_call (thread.c:2008)
==14759==    by 0x4EDB7D7: frr_run (libfrr.c:1216)
==14759==    by 0x1EF748: main (bgp_main.c:525)
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgp_damp.c
bgpd/bgp_damp.h
bgpd/bgp_route.c