]> The Tcpdump Group git mirrors - tcpdump/commit
CVE-2017-13052/CFM: refine decoding of the Sender ID TLV
authorDenis Ovsienko <[email protected]>
Mon, 14 Aug 2017 23:05:32 +0000 (00:05 +0100)
committerDenis Ovsienko <[email protected]>
Sun, 3 Sep 2017 23:08:58 +0000 (00:08 +0100)
commit7a7f71ee3f77b8ac08f2f4f7747ce8b8fa5b91f9
tree6dfe4f3cb3d64a29ad6f1e1c5db69456bcf42dd7
parent6b19892ea526f7e35999ab90a6734da8ff6b6111
CVE-2017-13052/CFM: refine decoding of the Sender ID TLV

In cfm_network_addr_print() add a length argument and use it to validate
the input buffer.

In cfm_print() add a length check for MAC address chassis ID. Supply
cfm_network_addr_print() with the length of its buffer and a correct
pointer to the buffer (it was off-by-one before). Change some error
handling blocks to skip to the next TLV in the current PDU rather than to
stop decoding the PDU. Print the management domain and address contents,
although in hex only so far.

Add some comments to clarify the code flow and to tell exact sections in
IEEE standard documents. Add new error messages and make some existing
messages more specific.

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).
print-cfm.c
tests/TESTLIST
tests/cfm_sender_id-oobr.out [new file with mode: 0644]
tests/cfm_sender_id-oobr.pcap [new file with mode: 0644]