ip6tables is missing libip6t_rt.so to filter the IPv6 RH0 exploit

Bug #114184 reported by Nick 'Zaf' Clifford
262
Affects Status Importance Assigned to Milestone
iptables (Ubuntu)
Fix Released
High
Kees Cook
Nominated for Hardy by r12056
Nominated for Intrepid by r12056
Nominated for Jaunty by r12056
Nominated for Karmic by r12056
Nominated for Lucid by r12056
Dapper
Fix Released
High
Kees Cook
Edgy
Fix Released
High
Kees Cook
Feisty
Fix Released
High
Martin Pitt

Bug Description

Binary package hint: iptables

In order to implement recommended[1] filtering for all IPv6 PoP's and routers, the RT match (routing header) is required. This recommendation is due to the following security DoS concern: http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf

The recommended commands to drop this type of routing is:
ip6tables -A INPUT -m rt --rt-type 0 -j DROP
ip6tables -A FORWARD -m rt --rt-type 0 -j DROP
ip6tables -A OUTPUT -m rt --rt-type 0 -j DROP

On a properly configured Linux kernel, this fails on Ubuntu Fesity with:
ip6tables v1.3.5: Couldn't load match `rt':/lib/iptables/libip6t_rt.so: cannot open shared object file: No such file or directory

I believe this is due to the iptables package not shipping with the RT match (probably due to the version being too old).

Given that IPv6 is supported in Feisty, and given that this is a serious potential DoS problem, I am tagging this as a security vulnerability.

The solution to fix is as obvious as it is non-trivial. Support the rt type match with iptables.

Revision history for this message
Nick 'Zaf' Clifford (zaf-nrc) wrote :
Revision history for this message
Michael Adams (madams) wrote :

Regarding libip6t_rt.so being missing from Ubuntu Feisty...

1. Based on a quick Google search, the extension in question has existed since the 1.2 series of ip6tables, if not earlier.
2. The extension in question is documented at http://www.netfilter.org/documentation/HOWTO/netfilter-extensions-HOWTO-6.html
3. Other distributions also failed to ship the extension: I found a user's own attempt to patch RHEL/CentOS at http://patrick.vande-walle.eu/software/ipv6-vulnerability-in-rhel4centos4/
4. The extension is promoted by SixXS and RIPE as the solution to the vunlerability. http://www.ripe.net/ripe/meetings/ripe-54/presentations/IPv6_Routing_Header.pdf
5. http://www.natisbad.org/ has been tracking changes in the Linux kernel that apparently are failing to disable the vulnerability at the kernel level.

This extension should be added immediately and encouraged for deployment.

Revision history for this message
Michael Adams (madams) wrote :

I have confirmed the module as missing from Ubuntu Feisty

Changed in iptables:
status: Unconfirmed → Confirmed
Revision history for this message
Nick 'Zaf' Clifford (zaf-nrc) wrote :

I have created a patch which enables the RT extension. This patch is a one line change, and can be added by anyone.

This does need to get applied to both Ubuntu 6.10 and 7.04.

This is a security problem, and machines without this patch and without the latest kernel version are vulnerable to DoS attacks, and to being a relay of a DoS attack.
Machines without this patch are also totally vulnerable to a particular type of rule bypass attack, where malicious hosts can send packets to hosts that are supposedly protected behind firewalls [1].

[1] http://www.ietf.org/internet-drafts/draft-ietf-v6ops-security-overview-06.txt

Revision history for this message
Nick 'Zaf' Clifford (zaf-nrc) wrote :

Can someone please change this bug to a high importance level. I believe that this needs to be fixed immediately, and so far noone has said any reason why it shouldn't be.

Revision history for this message
Kees Cook (kees) wrote :

The fix for the kernel is pending and should be published shortly. As for adding the "rt" module, I'm investigating now -- it seems like a good thing to add to iptables.

Changed in iptables:
importance: Undecided → High
Revision history for this message
Kees Cook (kees) wrote :

iptables (1.3.6.0debian1-5ubuntu4) gutsy; urgency=low

  * iptables/extensions/Makefile: enable "rt" module for ip6tables
    (LP: #114184).

 -- Kees Cook <email address hidden> Wed, 04 Jul 2007 03:56:20 -0700

Changed in iptables:
status: Confirmed → Fix Released
Revision history for this message
Kees Cook (kees) wrote :

I'm going to get this spun up for an SRU on Dapper through Feisty. It has been added to Gutsy. Thanks for the patch!

Changed in iptables:
assignee: nobody → keescook
importance: Undecided → High
status: New → Confirmed
importance: Undecided → High
status: New → Confirmed
assignee: nobody → keescook
importance: Undecided → High
status: New → Confirmed
Kees Cook (kees)
Changed in iptables:
assignee: nobody → keescook
Revision history for this message
Kees Cook (kees) wrote :

SRU proposal:

statement explaining the impact: the missing user-space module is needed to more fully protect IPv6 networks.
how the bug has been addressed: module was included in the list of default modules to compile.
patch: see comment 4.
instructions: run the command "sudo ip6tables -A INPUT -m rt --rt-type 0 -j DROP" and observe the missing shared library error.
discussion: currently the "rt" module is not available at all. regressions could exist if a user uses the "rt" module and it causes unexpected behaviors in the presently un-testable "rt" kernel module.

Changed in iptables:
assignee: nobody → keescook
Revision history for this message
Kees Cook (kees) wrote :
Revision history for this message
Kees Cook (kees) wrote :
Revision history for this message
Kees Cook (kees) wrote :
Changed in iptables:
status: Confirmed → In Progress
status: Confirmed → In Progress
status: Confirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Confirmed that yesterday's fix in gutsy worked, and patches look appropriate. Please go ahead and upload.

Revision history for this message
Kees Cook (kees) wrote :

Thanks! I have uploaded them to -proposed.

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into -proposed, please go ahead with QA testing.

Changed in iptables:
status: In Progress → Fix Committed
status: In Progress → Fix Committed
status: In Progress → Fix Committed
Revision history for this message
Kees Cook (kees) wrote :

iptables (1.3.6.0debian1-5ubuntu2.1) feisty-proposed; urgency=low

  * iptables/extensions/Makefile: enable "rt" module to enhance ip6tables
    matching capabilities. Add 090_enable-ipv6-rt.patch to match inline
    changes (LP: #114184).

 -- Kees Cook <email address hidden> Wed, 04 Jul 2007 16:57:55 -0700

Changed in iptables:
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

One occasion where changelog-closes-bugs does the wrong thing.

Changed in iptables:
status: Fix Released → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

Verifed that iptables version 1.3.3-2ubuntu4.1 works as expected on Dapper.

Revision history for this message
Brian Murray (brian-murray) wrote :

Verified that iptables version 1.3.5.0debian1-1ubuntu2.1 works as expected on Edgy.

Revision history for this message
Brian Murray (brian-murray) wrote :

Verified that iptables version 1.3.6.0debian1-5ubuntu2.1 works as expected on Feisty.

Revision history for this message
Kees Cook (kees) wrote :

This has been in -proposed for >7 days and has passed QA. Please copy from -proposed to -updates.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to feisty-updates.

Changed in iptables:
assignee: keescook → pitti
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Copied to edgy-updates.

Changed in iptables:
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Copied to dapper-updates.

Changed in iptables:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.