Title: IPFilter Fragment Rule Bypass Vulnerability
Severity: CRITICAL
Description:
IPFilter is a packet filtering implementation that is in wide use on a variety of Unix systems.
There exists a vulnerability in IPFilter that can allow an attacker to communicate with blocked ports on hosts behind an IPFilter firewall if the firewall allows access to some other port on the same host.
The vulnerability is due to the way that IPFilter handles IP fragments. When receiving IP fragments, IPFilter creates a 'decision cache' containing the IP header information from the initial fragment and the decision on whether to permit or deny following fragments through the firewall based on the information in the initial fragment (evaluated against the firewall ruleset).
This cache allows fragments following the initial IP fragment to be quickly permitted or denied. The decision caches do not last forever. They will be expired after a timeout period or can be removed once all fragments have been recieved in correct order. If the fragments following the initial one are in incorrect order (ie, reverse), the decision cache will not be discarded until it times out despite all of the fragments having been received.
It is possible for attackers to slip fragments for other packets into the firewall by duplicating the IP id and IP addresses in the original 'legitimate' fragment IP header. IPFilter does not notice if additional offset 0 fragments are recieved and will evaluate them based only on the decision cache.
It is therefore possible for an attacker to, providing that a 'permitted' decision cache still exists, have IP fragments with offset 0 (basically a new packet with a duplicate IP id and IP addresses in the IP header) containing arbitrary secondary headers passed through the firewall. Since nothing beyond the IP header is checked (fragment with offset 0 is not caught, so no reason to), an attacker can create an almost custom packet above the IP level (TCP, UDP). The limitations are that the IP addresses, IP id and protocol number are consistent with the information in the decision cache.
Through exploiting this vulnerability, an attacker may be able to bypass filtering rules and gain access to vulnerable services thought to be protected by blocking access to their ports. All that is required to exploit this vulnerability is a single open port so that a 'permit' decision cache can be created.
It should be noted that creating an IP filter rule to block fragmented IP traffic will not eliminate this vulnerability. If an attacker establishes a connection with a permitted service, an entry will be made for it in the IPFilter state table. If an initial fragment (containing a complete TCP header) is sent at that point, it will be permitted based on the state table and a fragment decision cache will be created. This entire process will have bypassed the entire ruleset, including the rule denying fragmented IP traffic. The attacker can then exploit this vulnerability to access blocked services in the manner described above.
Affected Products:
- Darren Reed IPFilter 3.1.1
- Darren Reed IPFilter 3.1.10
- Darren Reed IPFilter 3.1.2
- Darren Reed IPFilter 3.1.3
- Darren Reed IPFilter 3.1.4
- Darren Reed IPFilter 3.1.5
- Darren Reed IPFilter 3.1.6
- Darren Reed IPFilter 3.1.7
- Darren Reed IPFilter 3.1.8
- Darren Reed IPFilter 3.1.9
- Darren Reed IPFilter 3.2.1
- Darren Reed IPFilter 3.2.10
- Darren Reed IPFilter 3.2.11
- Darren Reed IPFilter 3.2.12
- Darren Reed IPFilter 3.2.13
- Darren Reed IPFilter 3.2.14
- Darren Reed IPFilter 3.2.15
- Darren Reed IPFilter 3.2.16
- Darren Reed IPFilter 3.2.17
- Darren Reed IPFilter 3.2.18
- Darren Reed IPFilter 3.2.19
- Darren Reed IPFilter 3.2.2
- Darren Reed IPFilter 3.2.20
- Darren Reed IPFilter 3.2.21
- Darren Reed IPFilter 3.2.22
- Darren Reed IPFilter 3.2.3
- Darren Reed IPFilter 3.2.4
- Darren Reed IPFilter 3.2.5
- Darren Reed IPFilter 3.2.6
- Darren Reed IPFilter 3.2.7
- Darren Reed IPFilter 3.2.8
- Darren Reed IPFilter 3.2.9
- Darren Reed IPFilter 3.3.1
- Darren Reed IPFilter 3.3.10
- Darren Reed IPFilter 3.3.11
- Darren Reed IPFilter 3.3.12
- Darren Reed IPFilter 3.3.13
- Darren Reed IPFilter 3.3.14
- Darren Reed IPFilter 3.3.15
- Darren Reed IPFilter 3.3.16
- Darren Reed IPFilter 3.3.17
- Darren Reed IPFilter 3.3.18
- Darren Reed IPFilter 3.3.19
- Darren Reed IPFilter 3.3.2
- Darren Reed IPFilter 3.3.20
- Darren Reed IPFilter 3.3.21
- Darren Reed IPFilter 3.3.22
- Darren Reed IPFilter 3.3.3
- Darren Reed IPFilter 3.3.4
- Darren Reed IPFilter 3.3.5
- Darren Reed IPFilter 3.3.6
- Darren Reed IPFilter 3.3.7
- Darren Reed IPFilter 3.3.8
- Darren Reed IPFilter 3.3.9
- Darren Reed IPFilter 3.4.1
- Darren Reed IPFilter 3.4.10
- Darren Reed IPFilter 3.4.11
- Darren Reed IPFilter 3.4.12
- Darren Reed IPFilter 3.4.13
- Darren Reed IPFilter 3.4.14
- Darren Reed IPFilter 3.4.15
- Darren Reed IPFilter 3.4.16
- Darren Reed IPFilter 3.4.2
- Darren Reed IPFilter 3.4.3
- Darren Reed IPFilter 3.4.4
- Darren Reed IPFilter 3.4.5
- Darren Reed IPFilter 3.4.6
- Darren Reed IPFilter 3.4.7
- Darren Reed IPFilter 3.4.8
- Darren Reed IPFilter 3.4.9
- FreeBSD FreeBSD 2.2.2
- FreeBSD FreeBSD 2.2.3
- FreeBSD FreeBSD 2.2.4
- FreeBSD FreeBSD 2.2.5
- FreeBSD FreeBSD 2.2.6
- FreeBSD FreeBSD 2.2.8
- FreeBSD FreeBSD 3.0.0
- FreeBSD FreeBSD 3.1.0
- FreeBSD FreeBSD 3.2.0
- FreeBSD FreeBSD 3.3.0
- FreeBSD FreeBSD 3.4.0
- FreeBSD FreeBSD 3.5.0
- FreeBSD FreeBSD 3.5.1
- FreeBSD FreeBSD 4.0.0
- FreeBSD FreeBSD 4.1.0
- FreeBSD FreeBSD 4.1.1
- FreeBSD FreeBSD 4.2.0
- HP IPFilter/9000 0.0.0
- NetBSD NetBSD 1.2.1
- NetBSD NetBSD 1.3.0
- NetBSD NetBSD 1.3.1
- NetBSD NetBSD 1.3.2
- NetBSD NetBSD 1.3.3
- NetBSD NetBSD 1.4.0
- NetBSD NetBSD 1.4.1
- NetBSD NetBSD 1.4.2
- NetBSD NetBSD 1.4.3
- NetBSD NetBSD 1.5.0
- OpenBSD OpenBSD 2.3.0
- OpenBSD OpenBSD 2.4.0
- OpenBSD OpenBSD 2.5.0
- OpenBSD OpenBSD 2.6.0
- OpenBSD OpenBSD 2.7.0
- OpenBSD OpenBSD 2.8.0
- SCO Open Server 5.0.6
- SCO Open Server 5.0.6 a
References:
- Darren Reed: IPFilter Homepage
Juniper Networks provides this content via a wide variety of sources and production methods. If notified of errors or omissions in the content of this page, Juniper Networks, at its discretion, will modify or remove the page or leave the content as is, depending on various factors including but not limited to the reputation and authority of the party providing the notification. Please use the contact information displayed elsewhere on this page to report any errors or omissions regarding the content on this page.