]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: Check if FQDN capability length is in valid ranges
authorDonatas Abraitis <donatas@opensourcerouting.org>
Fri, 24 May 2024 06:58:30 +0000 (09:58 +0300)
committerDonatas Abraitis <donatas@opensourcerouting.org>
Fri, 24 May 2024 07:38:49 +0000 (10:38 +0300)
commit0d079e01e55c35f466dc4982d9c2964f81a70140
treed53b0b1c60507f9e3ed1688adb3c7a53e74f3ecc
parent150eb73054902511b4be78666ab9895a7509a4ce
bgpd: Check if FQDN capability length is in valid ranges

If FQDN capability comes as dynamic capability we should check if the encoding
is proper.

Before this patch we returned an error if the hostname/domainname length check
was > end. But technically, if the length is also == end, this is
a malformed capability, because we use the data incorrectly after we check the
length.

This causes heap overflow (when compiled with address-sanitizer).

Signed-off-by: Iggy Frankovic <iggyfran@amazon.com>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd/bgp_packet.c