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]
Date:   Wed, 18 Jan 2017 06:35:29 -0500
From:   Jamal Hadi Salim <jhs@...atatu.com>
To:     Cong Wang <xiyou.wangcong@...il.com>
Cc:     David Miller <davem@...emloft.net>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        Jiri Pirko <jiri@...lanox.com>, paulb@...lanox.com,
        John Fastabend <john.fastabend@...il.com>,
        Simon Horman <simon.horman@...ronome.com>,
        Roman Mashak <mrv@...atatu.com>,
        Hadar Har-Zion <hadarh@...lanox.com>,
        Or Gerlitz <ogerlitz@...lanox.com>,
        Roi Dayan <roid@...lanox.com>,
        Daniel Borkmann <daniel@...earbox.net>
Subject: Re: [PATCH net-next v4 1/2] net sched actions: Add support for user
 cookies

On 17-01-17 01:40 PM, Cong Wang wrote:
> On Tue, Jan 17, 2017 at 3:11 AM, Jamal Hadi Salim <jhs@...atatu.com> wrote:
>> @@ -575,6 +583,23 @@ struct tc_action *tcf_action_init_1(struct net *net, struct nlattr *nla,
>>         if (err < 0)
>>                 goto err_mod;
>>
>> +       if (tb[TCA_ACT_COOKIE]) {
>> +               if (nla_len(tb[TCA_ACT_COOKIE]) > TC_COOKIE_MAX_SIZE) {
>> +                       err = -EINVAL;
>> +                       goto err_mod;
>> +               }
>> +
>> +               a->act_ck = kzalloc(sizeof(*a->act_ck), GFP_KERNEL);
>> +               if (unlikely(!a->act_ck)) {
>> +                       err = -ENOMEM;
>> +                       goto err_mod;
>> +               }
>> +
>
> I am afraid you can't just goto err_mod for error case here, b/c ->init()
> is already called before this, you probably either have to call ->destroy()
> for error path, or move this before ->init().
>

Thanks for catching this. Deserves a respin.
Easier to move it earlier.

cheers,
jamal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ