Commit Graph

9 Commits

Author SHA1 Message Date
Francois-Xavier Le Bail
eabcd87c1d Update some test capture files
These changes avoid some pcap_loop() errors messages like:
"tcpdump: pcap_loop: invalid packet capture length X, bigger than
snaplen of Y"
or
"tcpdump: pcap_loop: truncated dump file; tried to read X header
bytes, only got Y"

Update the output of the tests accordingly (no more "EXIT CODE" line).

Remove the no more useful .out.stderr files.
2019-11-02 21:49:18 +01:00
Michael Richardson
54aa31d109 updated a few test cases to include stderr failure output 2019-08-18 18:04:09 -04:00
Francois-Xavier Le Bail
018b2b8c96 Use UTC/GMT time when building/checking tests files
This will avoid some differences when checking in different time zones.

We now run the tests without the '-t' option. This will allow to get
problems/changes in time printing functions.

Update the output of the tests accordingly.

Moreover:
Add the '-#' option to better identify a packet when there is a difference
in output.
2018-08-09 09:23:07 +02:00
Denis Ovsienko
83c64fce3a CVE-2017-13050/RPKI-Router: fix a few bugs
The decoder didn't properly check that the PDU length stored in the PDU
header is correct. The only check in place was in rpki_rtr_print() and it
tested whether the length is zero but that is not sufficient. Make all
necessary length and bounds checks, both generic and type-specific, in
rpki_rtr_pdu_print() and reduce rpki_rtr_print() to a simple loop.

This also fixes a minor bug and PDU type 0 (Serial Notify from RFC 6810
Section 5.2) is valid again.

In rpki_rtr_pdu_print() any protocol version was considered version 0,
fix it to skip the rest of input if the PDU protocol version is unknown.

Ibid, the PDU type 10 (Error Report from RFC 6810 Section 5.10) case
block didn't consider the "Length of Error Text" data element mandatory,
put it right.

Ibid, when printing an encapsulated PDU, give itself (via recursion)
respective buffer length to make it possible to tell whether the
encapsulated PDU fits. Do not recurse deeper than 2nd level.

Update prior RPKI-Router test cases that now stop to decode earlier
because of the stricter checks.

This fixes a buffer over-read discovered by Bhargava Shastry,
SecT/TU Berlin.

Add a test using the capture file supplied by the reporter(s).
2017-09-13 12:25:44 +01:00
Guy Harris
3b841a3852 Update the test results.
The output is different with some recent changes.
2017-01-18 09:16:40 +01:00
Francois-Xavier Le Bail
4e01870063 RPKI-RTR: Remove printing when truncated condition already detected
Moreover:
Remove redundant 'truncated' messages.
Add and use tstr[].
Update output of some tests accordingly.
2016-08-18 13:59:52 +02:00
Francois-Xavier Le Bail
fb6e5377f3 RPKI to Router Protocol: Fix Segmentation Faults and other problems
-Fix/add ND_TCHECK2 tests,
-Fix a buffer overflow,
-Remove a debug printf
2015-03-13 14:27:39 +01:00
Guy Harris
c27d2e08e2 Fix previous checkins of test output. 2015-03-10 23:22:47 -07:00
Michael Richardson
364b00185b some patches to deal with kday pcap files
Author:    Michael Richardson <mcr@sandelman.ca>
2015-03-10 23:13:30 -07:00