Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Ido Schimmel <idosch@idosch.org>
Cc: "nikolay@nvidia.com" <nikolay@nvidia.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jiri Pirko <jiri@resnulli.us>, Roopa Prabhu <roopa@nvidia.com>,
	"bridge@lists.linux-foundation.org" 
	<bridge@lists.linux-foundation.org>,
	syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
	"syzbot+9ba1174359adba5a5b7c@syzkaller.appspotmail.com" 
	<syzbot+9ba1174359adba5a5b7c@syzkaller.appspotmail.com>
Subject: Re: [PATCH net] net: bridge: validate the NUD_PERMANENT bit when adding an extern_learn FDB entry
Date: Mon, 9 Aug 2021 12:32:39 +0000	[thread overview]
Message-ID: <20210809123238.pi26xjxraaczemne@skbuf> (raw)
In-Reply-To: <YREcqAdU+6IpT0+w@shredder>

On Mon, Aug 09, 2021 at 03:16:40PM +0300, Ido Schimmel wrote:
> On Mon, Aug 02, 2021 at 02:17:30AM +0300, Vladimir Oltean wrote:
> > diff --git a/net/bridge/br.c b/net/bridge/br.c
> > index ef743f94254d..bbab9984f24e 100644
> > --- a/net/bridge/br.c
> > +++ b/net/bridge/br.c
> > @@ -166,7 +166,8 @@ static int br_switchdev_event(struct notifier_block *unused,
> >  	case SWITCHDEV_FDB_ADD_TO_BRIDGE:
> >  		fdb_info = ptr;
> >  		err = br_fdb_external_learn_add(br, p, fdb_info->addr,
> > -						fdb_info->vid, false);
> > +						fdb_info->vid,
> > +						fdb_info->is_local, false);
> 
> When 'is_local' was added in commit 2c4eca3ef716 ("net: bridge:
> switchdev: include local flag in FDB notifications") it was not
> initialized in all the call sites that emit
> 'SWITCHDEV_FDB_ADD_TO_BRIDGE' notification, so it can contain garbage.

Thanks for the report, I'll send a patch which adds a:

	memset(&info, 0, sizeof(info));

to all SWITCHDEV_FDB_*_TO_BRIDGE call sites.

  reply	other threads:[~2021-08-09 12:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-01 23:17 Vladimir Oltean
2021-08-02  7:42 ` Nikolay Aleksandrov
2021-08-02  9:20   ` Vladimir Oltean
2021-08-02  9:42     ` Nikolay Aleksandrov
2021-08-02 10:52       ` Vladimir Oltean
2021-08-02 11:02         ` Nikolay Aleksandrov
2021-08-02 11:20           ` Vladimir Oltean
2021-08-02 11:25 ` Nikolay Aleksandrov
2021-08-02 22:10 ` patchwork-bot+netdevbpf
2021-08-09 12:16 ` Ido Schimmel
2021-08-09 12:32   ` Vladimir Oltean [this message]
2021-08-09 15:33   ` Nikolay Aleksandrov
2021-08-10  6:40     ` Ido Schimmel
2021-08-10  7:21       ` [PATCH net] net: bridge: fix flags interpretation for extern learn fdb entries Nikolay Aleksandrov
2021-08-10 11:00         ` [PATCH net v2] " Nikolay Aleksandrov
2021-08-10 13:50           ` Vladimir Oltean
2021-08-10 20:20           ` patchwork-bot+netdevbpf
2021-08-09 16:05   ` [PATCH net] net: bridge: validate the NUD_PERMANENT bit when adding an extern_learn FDB entry Vladimir Oltean
2021-08-10  6:46     ` Ido Schimmel
2021-08-10 10:09       ` Vladimir Oltean
2021-08-10 10:15         ` Nikolay Aleksandrov
2021-08-10 10:38           ` Vladimir Oltean
2021-08-10 10:43             ` Nikolay Aleksandrov

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=20210809123238.pi26xjxraaczemne@skbuf \
    --to=vladimir.oltean@nxp.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=idosch@idosch.org \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=roopa@nvidia.com \
    --cc=syzbot+9ba1174359adba5a5b7c@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --subject='Re: [PATCH net] net: bridge: validate the NUD_PERMANENT bit when adding an extern_learn FDB entry' \
    /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

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).