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: <1243604796.3966.21.camel@dogo.mojatatu.com>
Date:	Fri, 29 May 2009 09:46:36 -0400
From:	jamal <hadi@...erus.ca>
To:	Minoru Usui <usui@....nes.nec.co.jp>
Cc:	netdev@...r.kernel.org, containers@...ts.linux-foundation.org,
	Jarek Poplawski <jarkao2@...il.com>
Subject: Re: [BUG] net_cls: Panic occured when net_cls subsystem use

Hi there,

Sorry - cant help you on earlier question in the thread on
syntax of cls_group config (but we can revisit after resolving
this). You should always copy the maintainer if you want quick
answers (for cls_group case Thomas Graf).

On your patch:
I think you have found a real issue (I have a strong feeling
it has everything to do with your config process)

Comments below:

On Fri, 2009-05-29 at 14:18 +0900, Minoru Usui wrote:
> Hi, 


> diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
> index 0759f32..756148b 100644
> --- a/net/sched/cls_api.c
> +++ b/net/sched/cls_api.c
> @@ -266,11 +266,6 @@ replay:
>  			goto errout;
>  		}
>  
> -		spin_lock_bh(root_lock);
> -		tp->next = *back;
> -		*back = tp;
> -		spin_unlock_bh(root_lock);
> -
>  	} else if (tca[TCA_KIND] && nla_strcmp(tca[TCA_KIND], tp->ops->kind))
>  		goto errout;
>  
> @@ -314,8 +309,17 @@ replay:
>  	}
>  
>  	err = tp->ops->change(tp, cl, t->tcm_handle, tca, &fh);
> -	if (err == 0)
> -		tfilter_notify(skb, n, tp, fh, RTM_NEWTFILTER);
> +	if (err) {
> +		tcf_destroy(tp);
> +		goto errout;
> +	}
> +
> +	spin_lock_bh(root_lock);
> +	tp->next = *back;
> +	*back = tp;
> +	spin_unlock_bh(root_lock);
> +
> +	tfilter_notify(skb, n, tp, fh, RTM_NEWTFILTER);

This is incorrect. tp may already exist and you dont want to destroy
for failure to change its parameters. You also dont want to reattach
an existing tp because it succeeded in parameter change. 
So the soln is to check if this is a new tp and then do what you did
above...
Did that make sense?

cheers,
jamal

--
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