From: Paolo Abeni <pabeni@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, jiri@resnulli.us
Subject: Re: [PATCH net] team: avoid adding twice the same option to the event list
Date: Sun, 15 Apr 2018 21:53:38 +0200 [thread overview]
Message-ID: <1523822018.2710.9.camel@redhat.com> (raw)
In-Reply-To: <20180413.140705.1693433489799741559.davem@davemloft.net>
On Fri, 2018-04-13 at 14:07 -0400, David Miller wrote:
> From: Paolo Abeni <pabeni@redhat.com>
> Date: Fri, 13 Apr 2018 13:59:25 +0200
>
> > When parsing the options provided by the user space,
> > team_nl_cmd_options_set() insert them in a temporary list to send
> > multiple events with a single message.
> > While each option's attribute is correctly validated, the code does
> > not check for duplicate entries before inserting into the event
> > list.
> >
> > Exploiting the above, the syzbot was able to trigger the following
> > splat:
> ...
> > This changeset addresses the avoiding list_add() if the current
> > option is already present in the event list.
> >
> > Reported-and-tested-by: syzbot+4d4af685432dc0e56c91@syzkaller.appspotmail.com
> > Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> > Fixes: 2fcdb2c9e659 ("team: allow to send multiple set events in one message")
>
> Looks good to me.
>
> It's too bad that the tmp list entries don't get marked as they are
> added, or get unlinked by the list processor. Either scheme would
> make the "already added" test a lot simpler.
Yes, I considered both changes, but than opted for this solution,
beliving it would be less invasive and more suitable for -net.
Cheers,
Paolo
next prev parent reply other threads:[~2018-04-15 19:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-13 11:59 [PATCH net] team: avoid adding twice the same option to the event list Paolo Abeni
2018-04-13 18:07 ` David Miller
2018-04-15 19:53 ` Paolo Abeni [this message]
2018-04-16 15:03 ` David Miller
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=1523822018.2710.9.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
/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).