[PATCH] nexthop_compare_node: fix NULL iface dereference
Hello, I am proposing a fix for a segfault encountered in bird6, in the nexthop_compare_node function. This patch adds checks for validating that x->iface and y->iface are not null before accessing their index field. I initially proposed a fix on calico's bird fork : https://github.com/projectcalico/bird/pull/117 but I was asked to propose it to the official repo. Please find the full patch attached. Best regards, Mathieu.
Hello Mathieu, On Mon, Feb 16, 2026 at 05:35:19PM +0100, Mathieu Hautebas wrote:
I am proposing a fix for a segfault encountered in bird6, in the nexthop_compare_node function.
I'm confused. Do you mean BIRD 1.x, built for IPv6? That is EOL for quite some time and we are not accepting patches for that branch any more. Please note that last updates to BIRD 1.x were done in 2019, which you can also see in the the NEWS file.
This patch adds checks for validating that x->iface and y->iface are not null before accessing their index field.
What semantics is in a nexthop with no interface? If something, this would deserve more an assert than real handling. Such a situation should never happen in standard operation. Thank you for clarifying this. Maria -- Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.
participants (2)
-
Maria Matejka -
Mathieu Hautebas