netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: razor@blackwall.org
Cc: netdev@vger.kernel.org, stephen@networkplumber.org, joerg@higgsboson.tk
Subject: Re: [PATCH net] bridge: fix br_stp_set_bridge_priority race conditions
Date: Thu, 18 Jun 2015 03:31:01 -0700 (PDT)	[thread overview]
Message-ID: <20150618.033101.604712116094406473.davem@davemloft.net> (raw)
In-Reply-To: <1434389331-2376-1-git-send-email-razor@blackwall.org>

From: Nikolay Aleksandrov <razor@blackwall.org>
Date: Mon, 15 Jun 2015 20:28:51 +0300

> After the ->set() spinlocks were removed br_stp_set_bridge_priority
> was left running without any protection when used via sysfs. It can
> race with port add/del and could result in use-after-free cases and
> corrupted lists. Tested by running port add/del in a loop with stp
> enabled while setting priority in a loop, crashes are easily
> reproducible.
> The spinlocks around sysfs ->set() were removed in commit:
> 14f98f258f19 ("bridge: range check STP parameters")
> There's also a race condition in the netlink priority support that is
> fixed by this change, but it was introduced recently and the fixes tag
> covers it, just in case it's needed the commit is:
> af615762e972 ("bridge: add ageing_time, stp_state, priority over netlink")
> 
> Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
> Fixes: 14f98f258f19 ("bridge: range check STP parameters")

Applied and queued up for -stable, thanks.

      reply	other threads:[~2015-06-18 10:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15 17:28 [PATCH net] bridge: fix br_stp_set_bridge_priority race conditions Nikolay Aleksandrov
2015-06-18 10:31 ` David Miller [this message]

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=20150618.033101.604712116094406473.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=joerg@higgsboson.tk \
    --cc=netdev@vger.kernel.org \
    --cc=razor@blackwall.org \
    --cc=stephen@networkplumber.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).