]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BFD: Fix crash related to reconfiguration and passwords
authorOndrej Zajicek <santiago@crfreenet.org>
Thu, 27 Mar 2025 16:43:56 +0000 (17:43 +0100)
committerMaria Matejka <mq@ucw.cz>
Mon, 31 Mar 2025 10:57:50 +0000 (12:57 +0200)
Any change in BFD iface configuration should trigger session
reconfiguration, as config is copied into the bfd_session structure
and not just accessed through the bfd_iface structure.

As bfd_session now contains a pointer to the password list allocated
from the configuration, forgetting to update the bfd_session causes
use-after-free.

Thanks to Lexi Winter for the bugreport.

proto/bfd/bfd.c

index 4997f803ac6081c90442aa0f482ecd0ae2ae74e3..eba7a0ed5a1f2a636549c59887fa621b97bad5a2 100644 (file)
@@ -589,6 +589,8 @@ bfd_reconfigure_sessions(struct deferred_call *dc)
          min_tx_int,
          idle_tx_int,
          multiplier,
+         auth_type,
+         passwords,
          passive) false; /* terminating the || chain */
 #undef CHK