IPTables FTP Stateful Inspection Arbitrary Filter Rule Insertion Vulnerability
BID:2602
Info
IPTables FTP Stateful Inspection Arbitrary Filter Rule Insertion Vulnerability
| Bugtraq ID: | 2602 |
| Class: | Failure to Handle Exceptional Conditions |
| CVE: | |
| Remote: | Yes |
| Local: | No |
| Published: | Apr 16 2001 12:00AM |
| Updated: | Apr 16 2001 12:00AM |
| Credit: | Discovered by Cristiano Lincoln Mattos <[email protected]> and published on April 16, 2001. |
| Vulnerable: |
Linux kernel 2.4.3 Linux kernel 2.4.2 Linux kernel 2.4.1 Linux kernel 2.4 .0-test1 Linux kernel 2.4 |
| Not Vulnerable: | |
Discussion
IPTables FTP Stateful Inspection Arbitrary Filter Rule Insertion Vulnerability
The Linux kernel includes a built-in firewall implementation called IPTables. IPTables supports stateful inspection of several application protocols, one of which is FTP. The inspection is used to facilitate outgoing PORT connections for FTP data transfers when clients or servers are behind firewalls.
When a FTP PORT command containing an IP address which differs from the client's is processed by the stateful-inspection module, the occurrance is caught. Despite being detected, the condition is handled erroneously causing an entry for the PORT connection to be inserted into the table of 'RELATED' connections. This temporarily permits traffic through the firewall from the FTP server to the destination included in the PORT command.
An attacker may be able to use this vulnerability to access unauthorized hosts from the FTP server.
It should be noted that clients do not need to authenticate to exploit this vulnerability.
The Linux kernel includes a built-in firewall implementation called IPTables. IPTables supports stateful inspection of several application protocols, one of which is FTP. The inspection is used to facilitate outgoing PORT connections for FTP data transfers when clients or servers are behind firewalls.
When a FTP PORT command containing an IP address which differs from the client's is processed by the stateful-inspection module, the occurrance is caught. Despite being detected, the condition is handled erroneously causing an entry for the PORT connection to be inserted into the table of 'RELATED' connections. This temporarily permits traffic through the firewall from the FTP server to the destination included in the PORT command.
An attacker may be able to use this vulnerability to access unauthorized hosts from the FTP server.
It should be noted that clients do not need to authenticate to exploit this vulnerability.
Exploit / POC
IPTables FTP Stateful Inspection Arbitrary Filter Rule Insertion Vulnerability
Cristiano Lincoln Mattos <[email protected]> has provided proof-of-concept exploit code.
Cristiano Lincoln Mattos <[email protected]> has provided proof-of-concept exploit code.
Solution / Fix
IPTables FTP Stateful Inspection Arbitrary Filter Rule Insertion Vulnerability
Solution:
Red Hat has released upgraded packages and an advisory. The kernel upgrade is split into several different RPMs, all of which should be applied. Some components are optimized for different versions of the Intel architecture, ie i586, i686. Administrators are advised to install the optimized packages where appropriate.
The NetFilter core development team has released a source-code patch that addresses this issue:
Linux kernel 2.4.2
Linux kernel 2.4.3
Solution:
Red Hat has released upgraded packages and an advisory. The kernel upgrade is split into several different RPMs, all of which should be applied. Some components are optimized for different versions of the Intel architecture, ie i586, i686. Administrators are advised to install the optimized packages where appropriate.
The NetFilter core development team has released a source-code patch that addresses this issue:
Linux kernel 2.4.2
-
Red Hat 7.1 i386 devfsd-2.4.3-12.i386.rpm
ftp://updates.redhat.com/7.1/en/os/i386/devfsd-2.4.3-12.i386.rpm -
Red Hat 7.1 i386 kernel-2.4.3-12.i386.rpm
ftp://updates.redhat.com/7.1/en/os/i386/kernel-2.4.3-12.i386.rpm -
Red Hat 7.1 i386 kernel-BOOT-2.4.3-12.i386.rpm
ftp://updates.redhat.com/7.1/en/os/i386/kernel-BOOT-2.4.3-12.i386.rpm -
Red Hat 7.1 i386 kernel-doc-2.4.3-12.i386.rpm
ftp://updates.redhat.com/7.1/en/os/i386/kernel-doc-2.4.3-12.i386.rpm -
Red Hat 7.1 i386 kernel-headers-2.4.3-12.i386.rpm
ftp://updates.redhat.com/7.1/en/os/i386/kernel-headers-2.4.3-12.i386.r pm -
Red Hat 7.1 i386 kernel-source-2.4.3-12.i386.rpm
ftp://updates.redhat.com/7.1/en/os/i386/kernel-source-2.4.3-12.i386.rp m -
Red Hat 7.1 i586 kernel-2.4.3-12.i586.rpm
ftp://updates.redhat.com/7.1/en/os/i586/kernel-2.4.3-12.i586.rpm -
Red Hat 7.1 i586 kernel-smp-2.4.3-12.i586.rpm
ftp://updates.redhat.com/7.1/en/os/i586/kernel-smp-2.4.3-12.i586.rpm -
Red Hat 7.1 i686 kernel-2.4.3-12.i686.rpm
ftp://updates.redhat.com/7.1/en/os/i686/kernel-2.4.3-12.i686.rpm -
Red Hat 7.1 i686 kernel-enterprise-2.4.3-12.i686.rpm
ftp://updates.redhat.com/7.1/en/os/i686/kernel-enterprise-2.4.3-12.i68 6.rpm -
Red Hat 7.1 i686 kernel-smp-2.4.3-12.i686.rpm
ftp://updates.redhat.com/7.1/en/os/i686/kernel-smp-2.4.3-12.i686.rpm
Linux kernel 2.4.3
-
Linux NetFilter Developers ftp-security.patch
http://netfilter.samba.org/security-fix/ftp-security.patch -
Mandrake 8.0 i586 iptables-1.2.2-3.1mdk.i586.rpm
ftp://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/8.0/RPMS/i ptables-1.2.2-3.1mdk.i586.rpm -
Mandrake 8.0 i586 iptables-ipv6-1.2.2-3.1mdk.i586.rpm
ftp://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/8.0/RPMS/i ptables-ipv6-1.2.2-3.1mdk.i586.rpm -
Mandrake 8.0 i586 kernel-2.4.7-12.3mdk.i586.rpm
ftp://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/8.0/RPMS/k ernel-2.4.7-12.3mdk.i586.rpm -
Mandrake 8.0 i586 kernel-doc-2.4.7-12.3mdk.i586.rpm
ftp://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/8.0/RPMS/k ernel-doc-2.4.7-12.3mdk.i586.rpm -
Mandrake 8.0 i586 kernel-enterprise-2.4.7-12.3mdk.i586.rpm
ftp://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/8.0/RPMS/k ernel-enterprise-2.4.7-12.3mdk.i586.rpm -
Mandrake 8.0 i586 kernel-headers-2.4.7-12.3mdk.i586.rpm
ftp://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/8.0/RPMS/k ernel-headers-2.4.7-12.3mdk.i586.rpm -
Mandrake 8.0 i586 kernel-pcmcia-cs-2.4.7-12.3mdk.i586.rpm
ftp://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/8.0/RPMS/k ernel-pcmcia-cs-2.4.7-12.3mdk.i586.rpm -
Mandrake 8.0 i586 kernel-smp-2.4.7-12.3mdk.i586.rpm
ftp://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/8.0/RPMS/k ernel-smp-2.4.7-12.3mdk.i586.rpm -
Mandrake 8.0 i586 kernel-source-2.4.7-12.3mdk.i586.rpm
ftp://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/8.0/RPMS/k ernel-source-2.4.7-12.3mdk.i586.rpm -
Mandrake 8.0 i586 lm_utils-2.4.7_2.6.0-12.3mdk.i586.rpm
ftp://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/8.0/RPMS/l m_utils-2.4.7_2.6.0-12.3mdk.i586.rpm -
Mandrake 8.0 i586 lm_utils-devel-2.4.7_2.6.0-12.3mdk.i586.rpm
ftp://sunsite.ualberta.ca/pub/Mirror/Linux/mandrake/updates/8.0/RPMS/l m_utils-devel-2.4.7_2.6.0-12.3mdk.i586.rpm
References
IPTables FTP Stateful Inspection Arbitrary Filter Rule Insertion Vulnerability
References:
References:
- NetFilter Homepage (Linux NetFilter Developers)