The algorithm for re-assembling IKE payloads fragmented with the Cisco fragmentation protocol contains a bounds-checking flaw that allows a heap buffer to be overflowed with attacker-controlled data. A sequence of payloads with carefully chosen parameters causes a buffer of insufficient size to be allocated in the heap which is then overflowed when fragment payloads are copied into the buffer. Attackers can use this vulnerability to execute arbitrary code on affected devices.
Systems that are configured to terminate IKEv1 and IKEv2 VPN connections are vulnerable to exploitation. The Cisco security advisory describes how to determine if a system is configured in a vulnerable manner by checking the running crypto maps.
By sending specially crafted UDP packets directly to affected devices, a remote, unauthenticated attacker may be able to execute arbitrary code and gain full control of affected systems.
Apply an update
Cisco has issued updates for several versions of ASA to address this vulnerability. Users are encouraged to update to the latest version.
Note that Cisco ASA versions 7.2, 8.2, 8.3, and 8.6 are affected but no longer supported by the vendor. Users of these versions should strongly consider migrating to a supported solution.
Detect and filter malicious packets
According to the advisory by Exodus Intelligence:
Looking for the value of the length field of a Fragment Payload (type 132) IKEv2 or IKEv1 packet allows detecting an exploitation attempt. Any length field with a value < 8 must be considered as an attempt to exploit the vulnerability. The detection also has to deal with the fact that the multiple payloads can be chained inside an IKEv2 packet, and that the Fragment Payload may not be the only/first payload of the packet.
Network administrators may consider implementing rules to detect or block attacks.
Cisco ASA versions 7.2, 8.2, 8.3, 8.4, 8.6, 8.7, 9.0, 9.1, 9.2, 9.3, 9.4, and 9.5 are affected. Note that versions 7.2, 8.2, 8.3, and 8.6 are end of life and will not receive updates addressing this vulnerability.
If you have feedback, comments, or additional information about this vulnerability, please send us email.