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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5417AE81.4030501@intel.com>
Date:	Mon, 15 Sep 2014 20:29:05 -0700
From:	John Fastabend <john.r.fastabend@...el.com>
To:	Cong Wang <cwang@...pensource.com>,
	John Fastabend <john.fastabend@...il.com>
CC:	Cong Wang <xiyou.wangcong@...il.com>,
	David Miller <davem@...emloft.net>,
	Eric Dumazet <eric.dumazet@...il.com>,
	netdev <netdev@...r.kernel.org>,
	Jamal Hadi Salim <jhs@...atatu.com>
Subject: Re: [net-next PATCH 3/3] net: sched: cls_cgroup fix possible memory
 leak of 'new'

On 09/15/2014 08:04 PM, Cong Wang wrote:
> On Mon, Sep 15, 2014 at 7:48 PM, John Fastabend
> <john.fastabend@...il.com> wrote:
>> diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c
>> index 3b75487..52b7900 100644
>> --- a/net/sched/cls_cgroup.c
>> +++ b/net/sched/cls_cgroup.c
>> @@ -127,16 +127,16 @@ static int cls_cgroup_change(struct net *net, struct sk_buff *in_skb,
>>         err = nla_parse_nested(tb, TCA_CGROUP_MAX, tca[TCA_OPTIONS],
>>                                cgroup_policy);
>>         if (err < 0)
>> -               return err;
>> +               goto errout;
>>
>>         tcf_exts_init(&e, TCA_CGROUP_ACT, TCA_CGROUP_POLICE);
>>         err = tcf_exts_validate(net, tp, tb, tca[TCA_RATE], &e, ovr);
>>         if (err < 0)
>> -               return err;
>> +               goto errout;
>>
>>         err = tcf_em_tree_validate(tp, tb[TCA_CGROUP_EMATCHES], &t);
>>         if (err < 0)
>> -               return err;
>> +               goto errout;
>>
> 
> I think you need to call tcf_exts_destroy() too after tcf_exts_validate(),
> while you are on it. :)

Yep, and did a quick audit looks like its handled correctly in the other
classifiers.

Also there is a needed fix for cls_fw I'll include with the update for this patch.

.John

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

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