netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>, Eric Dumazet <edumazet@google.com>
Cc: syzbot <syzbot+65bb09a7208ce3d4a633@syzkaller.appspotmail.com>,
	Petr Machata <petrm@nvidia.com>,
	davem@davemloft.net, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, pabeni@redhat.com,
	syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [net?] kernel BUG in __nla_validate_parse
Date: Sat, 9 Mar 2024 13:56:09 -0700	[thread overview]
Message-ID: <0b17a2f1-76aa-488f-a94a-b9d07f0459f9@kernel.org> (raw)
In-Reply-To: <20240309104054.5f058be3@kernel.org>

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@nvidia.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.

  reply	other threads:[~2024-03-09 20:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-09 15:13 [syzbot] [net?] kernel BUG in __nla_validate_parse syzbot
2024-03-09 15:25 ` Eric Dumazet
2024-03-09 18:40   ` Jakub Kicinski
2024-03-09 20:56     ` David Ahern [this message]
2024-03-09 16:02 ` syzbot
2024-03-10  5:44 ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0b17a2f1-76aa-488f-a94a-b9d07f0459f9@kernel.org \
    --to=dsahern@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=syzbot+65bb09a7208ce3d4a633@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).