From: David Miller <davem@davemloft.net>
To: kaber@trash.net
Cc: khc@pm.waw.pl, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, netfilter-devel@lists.netfilter.org
Subject: Re: Broken commit: [NETFILTER]: ipt_REJECT: remove largely duplicate route_reverse function
Date: Tue, 28 Nov 2006 20:25:35 -0800 (PST) [thread overview]
Message-ID: <20061128.202535.112619392.davem@davemloft.net> (raw)
In-Reply-To: <456CF049.7040407@trash.net>
From: Patrick McHardy <kaber@trash.net>
Date: Wed, 29 Nov 2006 03:28:25 +0100
> [NETFILTER]: ipt_REJECT: fix memory corruption
>
> On devices with hard_header_len > LL_MAX_HEADER ip_route_me_harder()
> reallocates the skb, leading to memory corruption when using the stale
> tcph pointer to update the checksum.
>
> Signed-off-by: Patrick McHardy <kaber@trash.net>
Applied, thanks Patrick.
And based upon your discovery wrt. MAX_HEADER I'm also
applying the following.
commit 93e3a20d6c67a09b867431e7d5b3e7bc97154fab
Author: David S. Miller <davem@sunset.davemloft.net>
Date: Tue Nov 28 20:24:10 2006 -0800
[NET]: Fix MAX_HEADER setting.
MAX_HEADER is either set to LL_MAX_HEADER or LL_MAX_HEADER + 48, and
this is controlled by a set of CONFIG_* ifdef tests.
It is trying to use LL_MAX_HEADER + 48 when any of the tunnels are
enabled which set hard_header_len like this:
dev->hard_header_len = LL_MAX_HEADER + sizeof(struct xxx);
The correct set of tunnel drivers which do this are:
ipip
ip_gre
ip6_tunnel
sit
so make the ifdef test match.
Noticed by Patrick McHardy.
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 9264139..95e86ac 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -94,7 +94,9 @@ #endif
#endif
#if !defined(CONFIG_NET_IPIP) && \
- !defined(CONFIG_IPV6) && !defined(CONFIG_IPV6_MODULE)
+ !defined(CONFIG_NET_IPGRE) && \
+ !defined(CONFIG_IPV6_SIT) && \
+ !defined(CONFIG_IPV6_TUNNEL)
#define MAX_HEADER LL_MAX_HEADER
#else
#define MAX_HEADER (LL_MAX_HEADER + 48)
next prev parent reply other threads:[~2006-11-29 4:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-28 18:30 Broken commit: [NETFILTER]: ipt_REJECT: remove largely duplicate route_reverse function Krzysztof Halasa
2006-11-28 19:58 ` Patrick McHardy
2006-11-28 20:48 ` Krzysztof Halasa
2006-11-28 21:45 ` Patrick McHardy
2006-11-28 23:56 ` Krzysztof Halasa
2006-11-29 2:28 ` Patrick McHardy
2006-11-29 4:25 ` David Miller [this message]
2006-11-29 4:38 ` Herbert Xu
2006-11-29 4:44 ` David Miller
2006-11-29 4:56 ` Herbert Xu
2006-11-29 5:04 ` David Miller
2006-11-29 6:51 ` Herbert Xu
2006-12-01 4:22 ` David Miller
2006-12-01 4:37 ` Herbert Xu
2006-12-12 1:33 ` David Miller
2006-11-29 7:35 ` Jarek Poplawski
2006-11-29 15:06 ` Krzysztof Halasa
2006-11-29 15:16 ` Krzysztof Halasa
2006-11-30 8:31 ` Jarek Poplawski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061128.202535.112619392.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=khc@pm.waw.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).