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]
Message-ID: <0b17a2f1-76aa-488f-a94a-b9d07f0459f9@kernel.org>
Date: Sat, 9 Mar 2024 13:56:09 -0700
From: David Ahern <dsahern@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>, Eric Dumazet <edumazet@...gle.com>
Cc: syzbot <syzbot+65bb09a7208ce3d4a633@...kaller.appspotmail.com>,
 Petr Machata <petrm@...dia.com>, davem@...emloft.net,
 linux-kernel@...r.kernel.org, netdev@...r.kernel.org, pabeni@...hat.com,
 syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [net?] kernel BUG in __nla_validate_parse

On 3/9/24 11:40 AM, Jakub Kicinski wrote:
> On Sat, 9 Mar 2024 16:25:18 +0100 Eric Dumazet wrote:
>> On Sat, Mar 9, 2024 at 4:13 PM syzbot
>>> ..
>> Petr, can you take a look ?
>>
>> Thanks !
>>
>>
>> commit 2118f9390d83cf942de8b34faf3d35b54f9f4eee
>> Author: Petr Machata <petrm@...dia.com>
>> Date:   Wed Mar 6 13:49:15 2024 +0100
>>
>>     net: nexthop: Adjust netlink policy parsing for a new attribute
> 
> Yeah
> 
> +static const struct nla_policy rtm_nh_policy_del[] = {
> +       [NHA_ID]                = { .type = NLA_U32 },
> +};
> 
> +       err = nlmsg_parse(nlh, sizeof(struct nhmsg), tb, NHA_MAX,
> +                         rtm_nh_policy_del, extack);
> 
> The policy size must be >= max_attr (NHA_MAX).

ARRAY_SIZE is sufficient for both tb and parse. That is what the rest of
the file uses.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ