Skip to content

Conversation

donaldsharp
Copy link
Member

Direct leak of 160 byte(s) in 1 object(s) allocated from:
0 0x7f5b26cb83b7 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
1 0x7f5b2683a34d in qcalloc lib/memory.c:106
2 0x5592a7ec084a in bgp_pbr_match_entry_alloc_intern bgpd/bgp_pbr.c:1097
3 0x7f5b267f9b2f in hash_get lib/hash.c:147
4 0x5592a7ec3654 in bgp_pbr_policyroute_add_to_zebra_unit bgpd/bgp_pbr.c:2467
5 0x5592a7ec643b in bgp_pbr_policyroute_add_to_zebra bgpd/bgp_pbr.c:2608
6 0x5592a7ecd423 in bgp_pbr_handle_entry bgpd/bgp_pbr.c:2813
7 0x5592a7ecd423 in bgp_pbr_update_entry bgpd/bgp_pbr.c:2876
8 0x5592a7fd740a in bgp_zebra_announce_actual bgpd/bgp_zebra.c:1539
9 0x5592a7fdd85d in bgp_handle_route_announcements_to_zebra bgpd/bgp_zebra.c:1810
10 0x7f5b268eecf0 in event_call lib/event.c:2019
11 0x7f5b2681b293 in frr_run lib/libfrr.c:1247
12 0x5592a7dae8b7 in main bgpd/bgp_main.c:557
13 0x7f5b2630c249 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Turns out that the hash_release of a bpme and not actually freeing it.... is a recipe to leak memory.

Direct leak of 160 byte(s) in 1 object(s) allocated from:
    0 0x7f5b26cb83b7 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
    1 0x7f5b2683a34d in qcalloc lib/memory.c:106
    2 0x5592a7ec084a in bgp_pbr_match_entry_alloc_intern bgpd/bgp_pbr.c:1097
    3 0x7f5b267f9b2f in hash_get lib/hash.c:147
    4 0x5592a7ec3654 in bgp_pbr_policyroute_add_to_zebra_unit bgpd/bgp_pbr.c:2467
    5 0x5592a7ec643b in bgp_pbr_policyroute_add_to_zebra bgpd/bgp_pbr.c:2608
    6 0x5592a7ecd423 in bgp_pbr_handle_entry bgpd/bgp_pbr.c:2813
    7 0x5592a7ecd423 in bgp_pbr_update_entry bgpd/bgp_pbr.c:2876
    8 0x5592a7fd740a in bgp_zebra_announce_actual bgpd/bgp_zebra.c:1539
    9 0x5592a7fdd85d in bgp_handle_route_announcements_to_zebra bgpd/bgp_zebra.c:1810
    10 0x7f5b268eecf0 in event_call lib/event.c:2019
    11 0x7f5b2681b293 in frr_run lib/libfrr.c:1247
    12 0x5592a7dae8b7 in main bgpd/bgp_main.c:557
    13 0x7f5b2630c249 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Turns out that the hash_release of a bpme and not actually
freeing it.... is a recipe to leak memory.

Signed-off-by: Donald Sharp <[email protected]>
@frrbot frrbot bot added the bgp label Sep 26, 2025
@Jafaral Jafaral added this to the 10.5 milestone Sep 26, 2025
@ton31337
Copy link
Member

@Mergifyio backport stable/10.4 stable/10.3 stable/10.2

Copy link

mergify bot commented Sep 27, 2025

backport stable/10.4 stable/10.3 stable/10.2

✅ Backports have been created

@ton31337 ton31337 merged commit 8f56705 into FRRouting:master Sep 28, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants