]> The Tcpdump Group git mirrors - tcpdump/commit
CVE-2017-5205/Clean up parsing of IKEv2 Security Associations.
authorGuy Harris <[email protected]>
Sun, 15 Jan 2017 21:49:26 +0000 (13:49 -0800)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 18 Jan 2017 08:16:42 +0000 (09:16 +0100)
commit51d66a246aacc081d05590fa11cc367d7e6778f4
tree973f42070b8e5292ef6bf097d9928484551973e3
parent892603ab28d71b73fd17c9b9ececb3c4701fb9ee
CVE-2017-5205/Clean up parsing of IKEv2 Security Associations.

The payload of a Security Association has a sequence of proposal
substructures; the Last Substruc field should only be 0 (for the last
proposal substructure) or 2 (if there's another proposal substructure
after the current one).  If it's neither, don't try to dissect the next
item as a payload with the Last Substruc field's value as a payload
type.

The payload of a proposal substructure has a sequence of transform
substructures; the Last Substruc field should only be 0 (for the last
transform substructure) or 3 (if there's another transform substructure
after the current one).  If it's neither, don't try to dissect the next
item as a payload with the Last Substruc field's value as a payload
type.

That keeps us from trying to, for example, dissect a bogus substructure
as an encrypted payload item and passing a null pointer as the struct
isakmp structure pointer.

Do more checks while we're at it.
print-isakmp.c