lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121230063942.GA22499@t430s.redhat.com>
Date:	Sun, 30 Dec 2012 14:39:42 +0800
From:	Amos Kong <akong@...hat.com>
To:	netdev@...r.kernel.org
Cc:	davem@...emloft.net
Subject: Re: [PATCH] net: fix checking boundary of valid vlan id

On Sun, Dec 30, 2012 at 02:28:51PM +0800, akong@...hat.com wrote:
> From: Amos Kong <akong@...hat.com>
> 
> 4096 is not a valid vlan id.
> 
> Signed-off-by: Amos Kong <akong@...hat.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",

Hi David,

4095 is reserved, treat it as invalid here?

   			if (info->id >= VLAN_N_VID - 1) {
   				pr_debug("id %d is out of range (1-4094)\n",


>  					 info->id);
>  				return -EINVAL;
>  			}
> -- 
> 1.7.11.7
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ