]> The Tcpdump Group git mirrors - tcpdump/commit
CVE-2017-13003/Clean up the LMP dissector.
authorGuy Harris <[email protected]>
Mon, 20 Feb 2017 05:13:25 +0000 (21:13 -0800)
committerDenis Ovsienko <[email protected]>
Wed, 13 Sep 2017 11:25:44 +0000 (12:25 +0100)
commita25211918f2e790c67d859d20ccf8dbb81da1598
treea23e3ea36c807014da485cf339e6a5b6e1376764
parentcbddb98484ea8ec1deece351abd56e063d775b38
CVE-2017-13003/Clean up the LMP dissector.

Do a lot more bounds and length checks.

Add a EXTRACT_8BITS() macro, for completeness, and so as not to confuse
people into thinking that, to fetch a 1-byte value from a packet, they
need to use EXTRACT_16BITS() to fetch a 2-byte value and then use
shifting and masking to extract the desired byte.  Use that rather than
using EXTRACT_16BITS() to fetch a 2-byte value and then shifting and
masking to extract the desired byte.

Don't treat IPv4 addresses and unnumbered interface IDs the same; the
first should be printed as an IPv4 address but the latter should just be
printed as numbers.  Handle IPv6 addresses in more object types while
we're at it.

This fixes a buffer over-read discovered by Forcepoint's security
researchers Otto Airamo & Antti Levomäki.

Add a test using the capture file supplied by the reporter(s).
extract.h
print-lmp.c
tests/TESTLIST
tests/lmpv1_busyloop.out [new file with mode: 0644]
tests/lmpv1_busyloop.pcap [new file with mode: 0644]