]> git.baikalelectronics.ru Git - kernel.git/commit
[NETFILTER]: Fix ip6_tables extension header bypass bug
authorPatrick McHardy <kaber@trash.net>
Tue, 24 Oct 2006 23:15:10 +0000 (16:15 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Oct 2006 23:15:10 +0000 (16:15 -0700)
commit8e5a28ab69f4ed9a35c51110f79a1da5d7441208
treea8680dd059e9a4e115d17e54d4a8dcea4d196a3e
parent02dc2dbf883d0884cd4079f8efb17412f8cf19b3
[NETFILTER]: Fix ip6_tables extension header bypass bug

As reported by Mark Dowd <Mark_Dowd@McAfee.com>, ip6_tables is susceptible
to a fragmentation attack causing false negatives on extension header matches.

When extension headers occur in the non-first fragment after the fragment
header (possibly with an incorrect nexthdr value in the fragment header)
a rule looking for this extension header will never match.

Drop fragments that are at offset 0 and don't contain the final protocol
header regardless of the ruleset, since this should not happen normally.
Since all extension headers are before the protocol header this makes sure
an extension header is either not present or in the first fragment, where
we can properly parse it.

With help from Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/netfilter/ip6_tables.c
net/ipv6/netfilter/ip6t_ah.c
net/ipv6/netfilter/ip6t_frag.c
net/ipv6/netfilter/ip6t_hbh.c
net/ipv6/netfilter/ip6t_rt.c