Commit Graph

5 Commits

Author SHA1 Message Date
Denis Ovsienko
0db4dcafe5 CVE-2017-5342/pass correct caplen value to ether_print()
In that function the "length" parameter means off-the-wire length, that
is, the length declared inside the outer header. The "caplen" parameter
means the amount of bytes actually available in the captured packet.

gre_print_0() and the functions modelled after it passed the value of
"length" instead of the value of "caplen", this could make ether_print()
access beyond the memory allocated for the captured packet. Brian
Carpenter had demonstrated this for the OTV case.

Fix the involved functions that call ether_print() to pass the correct
value and leave a comment to dismiss "caplen" later as its value can be
reliably derived from the other ether_print() parameters.
2017-01-18 09:16:41 +01:00
Francois-Xavier Le Bail
b38f324af9 Add a summary comment in all other printers
Moreover:
Remove some redundant comments
Update some summary comments
Update the specification URL for ATA over Ethernet (AoE) protocol
2016-08-15 22:42:38 +02:00
Guy Harris
d04b4e4b88 Squelch a signed vs. unsigned comparison warning.
Multiplying a uint8_t by an int results in an int, not an unsigned int;
make NSH_HDR_WORD_SIZE an unsigned constant so the multiplication is
uint8_t times unsigned int.
2016-08-02 13:03:34 -07:00
Guy Harris
3d11d28ba0 Make sure the length of the header is valid.
It must be at least 2, as it includes the lengths of the Base and
Service Path headers, and those are always present.
2016-03-25 12:49:37 -07:00
bugyo
ba8a8cd5a3 Add printing function for Generic Protocol Extension for VXLAN
and Network Service Header.

This code stands for following internet drafts:

- VXLAN GPE: draft-ietf-nvo3-vxlan-gpe-01
- NSH: draft-ietf-sfc-nsh-01
2016-03-22 16:59:03 +01:00