]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: Ensure FRR has enough data to read 2 bytes in peek_for_as4_capability
authorDonald Sharp <sharpd@nvidia.com>
Fri, 30 Sep 2022 12:51:45 +0000 (08:51 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 30 Sep 2022 12:59:52 +0000 (08:59 -0400)
commit3e46b43e3788f0f87bae56a86b54d412b4710286
tree347715f8a7e13602b67de932a3c9e74962e5d46c
parent5ae96447d7e0b6f5e3a361b61b743b7e92e6832e
bgpd: Ensure FRR has enough data to read 2 bytes in peek_for_as4_capability

In peek_for_as4_capability the code is checking that the
stream has at least 2 bytes to read ( the opt_type and the
opt_length ).  However if BGP_OPEN_EXT_OPT_PARAMS_CAPABLE(peer)
is configured then FRR is reading 3 bytes.  Which is not good
since the packet could be badly formated.  Ensure that
FRR has the appropriate data length to read the data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_open.c