[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1243776293.3966.241.camel@dogo.mojatatu.com>
Date: Sun, 31 May 2009 09:24:53 -0400
From: jamal <hadi@...erus.ca>
To: Jarek Poplawski <jarkao2@...il.com>
Cc: Minoru Usui <usui@....nes.nec.co.jp>, netdev@...r.kernel.org,
containers@...ts.linux-foundation.org
Subject: Re: [BUG] net_cls: Panic occured when net_cls subsystem use
On Sun, 2009-05-31 at 10:12 +0200, Jarek Poplawski wrote:
> If somebody runs tc add filter with a new priority but existing handle
> a newly created (and not linked now) tc would be handled with goto
> errout and would leak, I guess.
This would imply the classifier is buggy. I will stare at the different
classifier - and if any exhibits such traits it needs to be fixed
> The change (in the two spots) is:
> > + if (n->nlmsg_type == RTM_NEWTFILTER &&
> > + (n->nlmsg_flags&(NLM_F_CREATE|NLM_F_EXCL))) {
> >
>
> Sorry, but I don't think this change is enough; tc filter replace
> with only this (n->nlmsg_type == RTM_NEWTFILTER &&
> (n->nlmsg_flags&(NLM_F_CREATE))) can get here with an "old" tp
> and will relink it or destroy depending on the ->change() return.
>
Excellent point - there could be buggy user space apps that will do
that. Minoru change the check to:
+ if (n->nlmsg_type == RTM_NEWTFILTER &&
+ (n->nlmsg_flags&NLM_F_CREATE &&
+ n->nlmsg_flags&NLM_F_EXCL)) {
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