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] [day] [month] [year] [list]
Date:   Tue, 9 Oct 2018 11:45:34 -0600
From:   David Ahern <dsahern@...il.com>
To:     Davide Caratti <dcaratti@...hat.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jamal Hadi Salim <jhs@...atatu.com>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH net] net/sched: cls_api: add missing validation of netlink
 attributes

On 10/9/18 10:12 AM, Davide Caratti wrote:
>>> --- a/net/sched/cls_api.c
>>> +++ b/net/sched/cls_api.c
>>> @@ -37,6 +37,11 @@ static LIST_HEAD(tcf_proto_base);
>>>  /* Protects list of registered TC modules. It is pure SMP lock. */
>>>  static DEFINE_RWLOCK(cls_mod_lock);
>>>  
>>> +const struct nla_policy cls_tca_policy[TCA_MAX + 1] = {
>>> +	[TCA_KIND]	= { .type = NLA_STRING },
>>> +	[TCA_CHAIN]	= { .type = NLA_U32 },
>>> +};
>>> +
>>
> 
>> it be nice to have a tc_common module so this stuff does not have to be
>> defined multiple times.
> 
> it makes sense to avoid duplicating the declaration of that array. But I
> don't think we can put it in a module, because CONFIG_NET_SCHED is 'bool'
> and
> 
> obj-$(CONFIG_NET_SCHED)         += sch_api.o
> 
> I can try a v2 where 'rtm_tca_policy' symbol in sch_api is exported and
> used by cls_api.c code. WDYT?

since NET_SCHED is a bool, that should work.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ