[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ae147dd3-1ad8-8b8b-93f1-09297171883a@cumulusnetworks.com>
Date: Wed, 14 Nov 2018 19:08:38 +0200
From: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
To: netdev@...r.kernel.org
Cc: roopa@...ulusnetworks.com, davem@...emloft.net,
bridge@...ts.linux-foundation.org, syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH net] net: bridge: fix per-port vlan stats use-after-free
on destruction
On 11/13/18 3:01 AM, Nikolay Aleksandrov wrote:
> Syzbot reported a use-after-free of the global vlan context on port vlan
> destruction. When I added per-port vlan stats I missed the fact that the
> global vlan context can be freed before the per-port vlan rcu callback.
> There're a few different ways to deal with this, I've chosen to add a
> new private flag that is set only when per-port stats are allocated so
> we can directly check it on destruction without dereferencing the global
> context at all. The flag is internally controlled by the kernel and
> user-space isn't allowed to set it.
>
> Fixes: 9163a0fc1f0c ("net: bridge: add support for per-port vlan stats")
> Reported-by: syzbot+04681da557a0e49a52e5@...kaller.appspotmail.com
> Signed-off-by: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
> ---
I'll post v2 with a cosmetic change - move the check up one level where
it's more logical to be and the rest of the checks are done.
Powered by blists - more mailing lists