diff options
| author | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2022-11-18 13:19:14 +0100 |
|---|---|---|
| committer | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2022-11-18 13:19:14 +0100 |
| commit | 22efe557f148ae43f8a7732bd0865eb3f17ad67c (patch) | |
| tree | 1ad810280e6c17087744e27771615af1b1758916 /tests/topotests/tc_basic/test_tc_basic.py | |
| parent | b7de3fe8a9907d37f9f7726a87e488de7f1f9ec4 (diff) | |
zebra: Fix use-after-free issue in srte cleanup
Currently, in `zebra_srte_client_close_cleanup` we use the `RB_FOREACH`
macro to traverse the SR policies tree. We remove the SR policies within
the loop. Removing elements from the tree and freeing them is not safe
and causes a use-after-free crash whenever the
`zebra_srte_client_close_cleanup` is called to perform cleanup.
This commit replaces the `RB_FOREACH` macro with its variant
`RB_FOREACH_SAFE`. Unlike `RB_FOREACH`, `RB_FOREACH_SAFE` permits both
the removal of tree elements as well as freeing them from within the
loop safely.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Diffstat (limited to 'tests/topotests/tc_basic/test_tc_basic.py')
0 files changed, 0 insertions, 0 deletions
