From: Pablo Neira Ayuso <pablo@netfilter.org>
To: akong@redhat.com
Cc: netdev@vger.kernel.org, davem@davemloft.net,
Netfilter Development Mailing list
<netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH] net: fix checking boundary of valid vlan id
Date: Thu, 3 Jan 2013 01:39:23 +0100 [thread overview]
Message-ID: <20130103003923.GA30625@1984> (raw)
In-Reply-To: <1356848931-22193-1-git-send-email-akong@redhat.com>
On Sun, Dec 30, 2012 at 02:28:51PM +0800, akong@redhat.com wrote:
> From: Amos Kong <akong@redhat.com>
>
> 4096 is not a valid vlan id.
>
> Signed-off-by: Amos Kong <akong@redhat.com>
> ---
> net/bridge/netfilter/ebt_vlan.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/bridge/netfilter/ebt_vlan.c b/net/bridge/netfilter/ebt_vlan.c
> index eae67bf..b279ec0 100644
> --- a/net/bridge/netfilter/ebt_vlan.c
> +++ b/net/bridge/netfilter/ebt_vlan.c
> @@ -121,8 +121,8 @@ static int ebt_vlan_mt_check(const struct xt_mtchk_param *par)
> * if_vlan.h: VLAN_N_VID 4096. */
> if (GET_BITMASK(EBT_VLAN_ID)) {
> if (!!info->id) { /* if id!=0 => check vid range */
> - if (info->id > VLAN_N_VID) {
> - pr_debug("id %d is out of range (1-4096)\n",
> + if (info->id >= VLAN_N_VID) {
> + pr_debug("id %d is out of range (1-4095)\n",
Someone may forge frames including reserved VLAN ids.
People can use ebtables to drop invalid frames, this is a firewalling
utility after all ;-). I'm not taking these, sorry.
next parent reply other threads:[~2013-01-03 0:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1356848931-22193-1-git-send-email-akong@redhat.com>
2013-01-03 0:39 ` Pablo Neira Ayuso [this message]
2013-01-03 20:06 ` [PATCH] net: fix checking boundary of valid vlan id Ben Hutchings
2012-12-30 9:21 akong
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=20130103003923.GA30625@1984 \
--to=pablo@netfilter.org \
--cc=akong@redhat.com \
--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).