]> The Tcpdump Group git mirrors - tcpdump/commit
CVE-2017-12989/RESP: Make sure resp_get_length() advances the pointer for invalid...
authorGuy Harris <[email protected]>
Tue, 7 Feb 2017 08:13:33 +0000 (00:13 -0800)
committerDenis Ovsienko <[email protected]>
Wed, 13 Sep 2017 11:25:44 +0000 (12:25 +0100)
commitdb24063b01cba8e9d4d88b7d8ac70c9000c104e4
treee52116ebc4a2756ca4771565901ae202e517fdf5
parent2ecb9d2c67d9119250c54811a6ce4d0f2ddf44f1
CVE-2017-12989/RESP: Make sure resp_get_length() advances the pointer for invalid lengths.

Make sure that it always sends *endp before returning and that, for
invalid lengths where we don't like a character in the length string,
what it sets *endp to is past the character in question, so we don't
run the risk of infinitely looping (or doing something else random) if a
character in the length is invalid.

This fixes an infinite loop discovered by Forcepoint's security
researchers Otto Airamo & Antti Levomäki.

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