From: Hangbin Liu <liuhangbin@gmail.com>
To: syzbot+ecd7e07b4be038658c9f@syzkaller.appspotmail.com
Cc: Jiri Pirko <jiri@resnulli.us>, Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: team: fix incorrect maxattr
Date: Tue, 9 Apr 2024 17:41:14 +0800 [thread overview]
Message-ID: <ZhUNOvAuGLgvdTm1@Laptop-X1> (raw)
In-Reply-To: <20240409092812.3999785-1-liuhangbin@gmail.com>
On Tue, Apr 09, 2024 at 05:28:12PM +0800, Hangbin Liu wrote:
> The maxattr should be the latest attr value, i.e. array size - 1,
> not total array size.
>
> Reported-by: syzbot+ecd7e07b4be038658c9f@syzkaller.appspotmail.com
> Fixes: 948dbafc15da ("net: team: use policy generated by YAML spec")
> Suggested-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> ---
> drivers/net/team/team_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/team/team_core.c b/drivers/net/team/team_core.c
> index 4e3c8d404957..8c7dbaf7c22e 100644
> --- a/drivers/net/team/team_core.c
> +++ b/drivers/net/team/team_core.c
> @@ -2808,7 +2808,7 @@ static const struct genl_multicast_group team_nl_mcgrps[] = {
> static struct genl_family team_nl_family __ro_after_init = {
> .name = TEAM_GENL_NAME,
> .version = TEAM_GENL_VERSION,
> - .maxattr = ARRAY_SIZE(team_nl_policy),
> + .maxattr = ARRAY_SIZE(team_nl_policy) - 1,
> .policy = team_nl_policy,
> .netnsok = true,
> .module = THIS_MODULE,
> --
> 2.43.0
>
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git main
next prev parent reply other threads:[~2024-04-09 9:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-09 9:28 [PATCH net-next] net: team: fix incorrect maxattr Hangbin Liu
2024-04-09 9:41 ` Hangbin Liu [this message]
2024-04-10 5:07 ` [syzbot] [net?] KASAN: global-out-of-bounds Read in __nla_validate_parse syzbot
2024-04-11 2:40 ` [PATCH net-next] net: team: fix incorrect maxattr patchwork-bot+netdevbpf
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=ZhUNOvAuGLgvdTm1@Laptop-X1 \
--to=liuhangbin@gmail.com \
--cc=edumazet@google.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzbot+ecd7e07b4be038658c9f@syzkaller.appspotmail.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