From da348bf0e1a94e2eaa9b7e79f249d96b566fb832 Mon Sep 17 00:00:00 2001 From: Francois-Xavier Le Bail Date: Tue, 22 Oct 2019 18:52:47 +0200 Subject: [PATCH] BGP: Add a test capture file This capture file triggered a buffer over-read with the 4.9.2 release fixed in the 4.9.3 release. With a length check previously added, the problem no longer exists. Thus no fix needed. The pcap file was updated to pass the sanity checks and to avoid pcap_loop() error messages. Update the output of the test accordingly. Partial update from e3f3b445e2d20ac5d5b7fcb7559ce6beb55da0c9 in 4.9 branch. --- tests/TESTLIST | 1 + tests/bgp-bgp_capabilities_print-oobr-2.out | 20 +++++++++++++++++++ tests/bgp-bgp_capabilities_print-oobr-2.pcap | Bin 0 -> 272 bytes 3 files changed, 21 insertions(+) create mode 100644 tests/bgp-bgp_capabilities_print-oobr-2.out create mode 100644 tests/bgp-bgp_capabilities_print-oobr-2.pcap diff --git a/tests/TESTLIST b/tests/TESTLIST index 43ccdf3c..56123171 100644 --- a/tests/TESTLIST +++ b/tests/TESTLIST @@ -611,6 +611,7 @@ icmp-icmp_print-oobr-2 icmp-icmp_print-oobr-2.pcap icmp-icmp_print-oobr-2.out -v rsvp-rsvp_obj_print-oobr rsvp-rsvp_obj_print-oobr.pcap rsvp-rsvp_obj_print-oobr.out -v vrrp-vrrp_print-oobr vrrp-vrrp_print-oobr.pcap vrrp-vrrp_print-oobr.out -v bgp-bgp_capabilities_print-oobr-1 bgp-bgp_capabilities_print-oobr-1.pcap bgp-bgp_capabilities_print-oobr-1.out -v +bgp-bgp_capabilities_print-oobr-2 bgp-bgp_capabilities_print-oobr-2.pcap bgp-bgp_capabilities_print-oobr-2.out -v # The .pcap file is truncated after the 1st packet. hncp_dhcpv6data-oobr hncp_dhcpv6data-oobr.pcap hncp_dhcpv6data-oobr.out -v -c1 hncp_dhcpv4data-oobr hncp_dhcpv4data-oobr.pcap hncp_dhcpv4data-oobr.out -v -c1 diff --git a/tests/bgp-bgp_capabilities_print-oobr-2.out b/tests/bgp-bgp_capabilities_print-oobr-2.out new file mode 100644 index 00000000..229bd29e --- /dev/null +++ b/tests/bgp-bgp_capabilities_print-oobr-2.out @@ -0,0 +1,20 @@ + 1 01:04:13.49220352 IP (tos 0x1f,CE, ttl 254, id 38671, offset 0, flags [+, DF, rsvd], proto TCP (6), length 4135, bad cksum 200 (->1fdd)!) + 226.219.0.0.179 > 16.233.34.0.100: Flags [SPUE], seq 347537408:347541483, win 511, urg 65535, options [eol], length 4075: BGP [|bgp] + Open Message (1), length: 59 + Version 255, my AS 65528, Holdtime 4324s, ID 144.8.32.4 + Optional parameters, length: 29 + Option Unknown (0), length: 0 + no decoder for option 0 + Option Capabilities Advertisement (2), length: 8 + Graceful Restart (64), length: 0 (too short, < 2) + Option Unknown (0), length: 2 + no decoder for option 0 + Option Capabilities Advertisement (2), length: 2 + Unknown (232), length: 3 + no decoder for Capability 232 + 0x0000: 0207 04 + Option Capabilities Advertisement (2), length: 7 + Multiple Routes to a Destination (4), length: 0 + no decoder for Capability 4 + Multiple Labels (8), length: 0 + Multiprotocol Extensions (1), length: 0 (too short, < 4) diff --git a/tests/bgp-bgp_capabilities_print-oobr-2.pcap b/tests/bgp-bgp_capabilities_print-oobr-2.pcap new file mode 100644 index 0000000000000000000000000000000000000000..61946f9b51968375ec258587c97d5d98ed133f1d GIT binary patch literal 272 zcmca|c+)~A1{MZMMg|6kh6DHR11S)bcU~d`1NVET7eF=xQ2xFDZ_lP(4a_2Ux31t| zaFrKOpU(e);U60l!=u{_3<58e7#KD)q=;;1V0hNbz`H(+@jnB@|NjgE{~5&p|8HPm zQ2j5!3O09JBIAE3fH8m;KyBh@U_1r3$&CppDDbC&<2{SueOV literal 0 HcmV?d00001 -- 2.39.5