From: Patrick McHardy <kaber@trash.net>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Patrick McHardy <kaber@trash.net>,
netfilter-devel@vger.kernel.org
Subject: netfilter 03/09: bridge: Disable PPPOE/VLAN processing by default
Date: Mon, 12 Jan 2009 11:06:03 +0100 (MET) [thread overview]
Message-ID: <20090112100603.9280.52407.sendpatchset@x2.localnet> (raw)
In-Reply-To: <20090112100559.9280.23431.sendpatchset@x2.localnet>
commit 12eda8e57aaca177ed94db3d9883873cd4522c99
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date: Mon Jan 12 06:28:48 2009 +0100
netfilter: bridge: Disable PPPOE/VLAN processing by default
The PPPOE/VLAN processing code in the bridge netfilter is broken
by design. The VLAN tag and the PPPOE session ID are an integral
part of the packet flow information, yet they're completely
ignored by the bridge netfilter. This is potentially a security
hole as it treats all VLANs and PPPOE sessions as the same.
What's more, it's actually broken for PPPOE as the bridge netfilter
tries to trim the packets to the IP length without adjusting the
PPPOE header (and adjusting the PPPOE header isn't much better
since the PPPOE peer may require the padding to be present).
Therefore we should disable this by default.
It does mean that people relying on this feature may lose networking
depending on how their bridge netfilter rules are configured.
However, IMHO the problems this code causes are serious enough to
warrant this.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Patrick McHardy <kaber@trash.net>
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 9a1cd75..cf754ac 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -58,11 +58,11 @@ static struct ctl_table_header *brnf_sysctl_header;
static int brnf_call_iptables __read_mostly = 1;
static int brnf_call_ip6tables __read_mostly = 1;
static int brnf_call_arptables __read_mostly = 1;
-static int brnf_filter_vlan_tagged __read_mostly = 1;
-static int brnf_filter_pppoe_tagged __read_mostly = 1;
+static int brnf_filter_vlan_tagged __read_mostly = 0;
+static int brnf_filter_pppoe_tagged __read_mostly = 0;
#else
-#define brnf_filter_vlan_tagged 1
-#define brnf_filter_pppoe_tagged 1
+#define brnf_filter_vlan_tagged 0
+#define brnf_filter_pppoe_tagged 0
#endif
static inline __be16 vlan_proto(const struct sk_buff *skb)
next prev parent reply other threads:[~2009-01-12 10:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-12 10:05 netfilter 00/09: netfilter fixes/trivial patches Patrick McHardy
2009-01-12 10:06 ` netfilter 01/09: remove "happy cracking" message Patrick McHardy
2009-01-12 10:06 ` netfilter 02/09: bridge: Fix handling of non-IP packets in FORWARD/POST_ROUTING Patrick McHardy
2009-01-12 10:06 ` Patrick McHardy [this message]
2009-01-12 10:06 ` netfilter 04/09: x_tables: fix match/target revision lookup Patrick McHardy
2009-01-12 10:06 ` netfilter 05/09: ebtables: fix inversion in match code Patrick McHardy
2009-01-12 10:06 ` netfilter 06/09: nf_conntrack: fix ICMP/ICMPv6 timeout sysctls on big-endian Patrick McHardy
2009-01-12 10:06 ` netfilter 07/09: simplify nf_conntrack_alloc() error handling Patrick McHardy
2009-01-12 10:06 ` netfilter 08/09: xt_time: print timezone for user information Patrick McHardy
2009-01-12 10:06 ` netfilter 09/09: remove padding from struct xt_match on 64bit builds Patrick McHardy
2009-01-13 0:39 ` netfilter 00/09: netfilter fixes/trivial patches David Miller
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=20090112100603.9280.52407.sendpatchset@x2.localnet \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.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).