mbox series

[net,0/2] net: bridge: multicast: fix automatic router port marking races

Message ID 20210711095629.2986949-1-razor@blackwall.org
Headers show
Series net: bridge: multicast: fix automatic router port marking races | expand

Message

Nikolay Aleksandrov July 11, 2021, 9:56 a.m. UTC
From: Nikolay Aleksandrov <nikolay@nvidia.com>

Hi,
While working on per-vlan multicast snooping I found two race conditions
when multicast snooping is enabled. They're identical and happen when
the router port list is modified without the multicast lock. One requires
a PIM hello message to be received on a port and the other an MRD
advertisement. To fix them we just need to take the multicast_lock when
adding the ports to the router port list (marking them as router ports).
Tested on an affected setup by generating the required packets while
modifying the port list in parallel.

Thanks,
 Nik

Nikolay Aleksandrov (2):
  net: bridge: multicast: fix PIM hello router port marking race
  net: bridge: multicast: fix MRD advertisement router port marking race

 net/bridge/br_multicast.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

patchwork-bot+netdevbpf@kernel.org July 12, 2021, 5:50 p.m. UTC | #1
Hello:

This series was applied to netdev/net.git (refs/heads/master):

On Sun, 11 Jul 2021 12:56:27 +0300 you wrote:
> From: Nikolay Aleksandrov <nikolay@nvidia.com>

> 

> Hi,

> While working on per-vlan multicast snooping I found two race conditions

> when multicast snooping is enabled. They're identical and happen when

> the router port list is modified without the multicast lock. One requires

> a PIM hello message to be received on a port and the other an MRD

> advertisement. To fix them we just need to take the multicast_lock when

> adding the ports to the router port list (marking them as router ports).

> Tested on an affected setup by generating the required packets while

> modifying the port list in parallel.

> 

> [...]


Here is the summary with links:
  - [net,1/2] net: bridge: multicast: fix PIM hello router port marking race
    https://git.kernel.org/netdev/net/c/04bef83a3358
  - [net,2/2] net: bridge: multicast: fix MRD advertisement router port marking race
    https://git.kernel.org/netdev/net/c/000b7287b675

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html