]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: Ensure FRR has enough data to read 2 bytes in bgp_open_option_parse 12043/head
authorDonald Sharp <sharpd@nvidia.com>
Fri, 30 Sep 2022 12:57:43 +0000 (08:57 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 30 Sep 2022 13:00:02 +0000 (09:00 -0400)
commit1117baca3c592877a4d8a13ed6a1d9bd83977487
tree69f5bb500d282c9a6ddaad9a972a0e86cb16a1bd
parent3e46b43e3788f0f87bae56a86b54d412b4710286
bgpd: Ensure FRR has enough data to read 2 bytes in bgp_open_option_parse

In bgp_open_option_parse 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 formateed.  Ensure that
FRR has the appropriate data length to read the data.

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