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: Sat, 9 Mar 2024 10:50:26 -0700
From: David Ahern <dsahern@...nel.org>
To: Eric Dumazet <edumazet@...gle.com>, Petr Machata <petrm@...dia.com>
Cc: "David S. Miller" <davem@...emloft.net>, Jakub Kicinski
 <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
 Ido Schimmel <idosch@...dia.com>, Simon Horman <horms@...nel.org>,
 mlxsw@...dia.com
Subject: Re: [PATCH net-next v4 1/7] net: nexthop: Adjust netlink policy
 parsing for a new attribute

On 3/9/24 8:02 AM, Eric Dumazet wrote:
> 
> ...
> 
>> -
>>  /* rtnl */
>>  static int rtm_del_nexthop(struct sk_buff *skb, struct nlmsghdr *nlh,
>>                            struct netlink_ext_ack *extack)
>>  {
>>         struct net *net = sock_net(skb->sk);
>> +       struct nlattr *tb[NHA_MAX + 1];
> 
> big tb[] array, but small rtm_nh_policy_del[] policy.
> 
>>         struct nl_info nlinfo = {
>>                 .nlh = nlh,
>>                 .nl_net = net,
>> @@ -3020,7 +3010,12 @@ static int rtm_del_nexthop(struct sk_buff *skb, struct nlmsghdr *nlh,
>>         int err;
>>         u32 id;
>>
>> -       err = nh_valid_get_del_req(nlh, &id, extack);
>> +       err = nlmsg_parse(nlh, sizeof(struct nhmsg), tb, NHA_MAX,
> 
> But here you pass NHA_MAX...
> 

existing code always used ARRAY_SIZE on the policy for both tb and
parse; the new del change should use it. Missed that in the review.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ