]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: fix allocating uninitialized bgp_labels
authorLouis Scalbert <louis.scalbert@6wind.com>
Tue, 22 Oct 2024 13:07:26 +0000 (15:07 +0200)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Thu, 24 Oct 2024 14:37:11 +0000 (14:37 +0000)
commit993cb692db67f69ebb69cf64b085d34cd33caec9
tree79044f8109ac8119ec329f98b626b54b375106a0
parentfceb618186bba24cf989187ad07cec543aae9b66
bgpd: fix allocating uninitialized bgp_labels

Memory was not zeroed at allocation.

> ==2604268== Conditional jump or move depends on uninitialised value(s)
> ==2604268==    at 0x26F026: bgp_labels_unintern (bgp_label.c:116)
> ==2604268==    by 0x30000C: adj_free (bgp_updgrp_adv.c:81)
> ==2604268==    by 0x3019EE: bgp_adj_out_remove_subgroup (bgp_updgrp_adv.c:728)
> ==2604268==    by 0x30537C: subgroup_withdraw_packet (bgp_updgrp_packet.c:1042)
> ==2604268==    by 0x2970AF: bgp_generate_updgrp_packets (bgp_packet.c:508)
> ==2604268==    by 0x49E06F1: event_call (event.c:2001)
> ==2604268==    by 0x495AB8B: frr_run (libfrr.c:1238)
> ==2604268==    by 0x200C4B: main (bgp_main.c:555)

Fixes: 3c86f776f0 ("bgpd: add bgp_labels hash")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit dd10379b3e4c544874306fbb5efec5afc1cf1f9e)
bgpd/bgp_label.c