Generic Routing Encapsulation (GRE) is a generic packet encapsulation protocol. GRE is documented in RFC1701 and RFC2784.
- Cisco IOS software 12.0, 12.1, and 12.2 based trains
- All devices running affected versions of Cisco IOS® software and configured with GRE IP or GRE IP multipoint tunnels
Products Not Affected by This Vulnerability
- Cisco IOS Software 12.3 and 12.4 based trains
- Cisco IOS Software 12.0S release train, with a revision later than Cisco IOS Software Release 12.0(23)S, with CEF enabled (default behavior)
In RFC1701, the GRE Header field (described in RFC2784 as Reserved0) contains a number of flag bits which RFC2784 deprecates. In particular, the Routing Present and Strict Source Route bits along with Routing Information fields have been deprecated. All versions of Cisco IOS software that support RFC2784 will not be affected by this vulnerability, as any packet where any of the bits 1-5 are non-zero will be discarded.
Cisco IOS software releases that contain ANY of the following three fixes are RFC2784 compliant and are not affected by this vulnerability:
Vulnerability Impact Overview
Upon receiving a specially crafted GRE packet, depending on the data within a specific packet memory location, the GRE code will decapsulate a packet using the contents of referenced memory buffers.
With debug tunnel enabled, output similar as shown below will be produced:
GRE decapsulated IP 0.3.74.0->0.0.1.30 (len=65407, ttl=39
GRE decapsulated IP 22.214.171.124->0.0.0.0 (len=64904, ttl=0
GRE decapsulated IP 0.15.31.193->126.96.36.199 (len=64894, ttl=237
GRE decapsulated IP 188.8.131.52->184.108.40.206 (len=64884, ttl=128)
Only if the referenced memory buffers data decapsulates to a valid IPv4 packet will this packet be forwarded. Invalid IPv4 packets will be dropped at the router.
This potentially could be used to bypass access-control lists on the router.
Workarounds and Mitigations
The following workaround is applicable to Cisco IOS software 12.0S based trains only:
- Cisco Express Forwarding (CEF)
Running the Cisco IOS software 12.0S release train, with a revision later than Cisco IOS Software Release 12.0(23)S, with CEF enabled, will mitigate this vulnerability. CEF is enabled by default for Cisco IOS software versions 12.0S releases. To check the status of CEF on the router, issue the CLI command sh ip cef or sh ip cef interface. Refer to http://www.cisco.com/en/US/docs/ios/12_2/switch/configuration/guide/xcfcefc.html for further information on CEF.
The following mitigations may be applied to vulnerable Cisco IOS software releases: