Skip to content

bridge: mcast: Fix a possible use-after-free when removing a bridge port

Ido Schimmel bridge netdev 1 version Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2bridge: mcast: Fix a possible use-after-free when removing a bridge portnet/bridge/br_multicast.c+17 -51 replyApplied
2/2selftests: bridge_vlan_mcast: Test toggling of multicast snoopingtools/testing/selftests/net/forwarding/bridge_vlan_mcast.sh+29 -10 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchNikolay Aleksandrov
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net 0/2] bridge: mcast: Fix a possible use-after-free when removing a bridge port

Patch #1 fixes a possible use-after-free when removing a bridge port.

Patch #2 adds a test case that triggers the problem.

In net-next we can:

1. Add DEBUG_NET_WARN_ON_ONCE() when a port multicast context is de-initialized while enabled.

2. When de-initializing a port multicast context, synchronously shutdown all the timers that were initialized when the context was initialized.

Ido Schimmel (2):
bridge: mcast: Fix a possible use-after-free when removing a bridge
port
selftests: bridge_vlan_mcast: Test toggling of multicast snooping

 net/bridge/br_multicast.c                     | 22 ++++++++++----
 .../net/forwarding/bridge_vlan_mcast.sh       | 30 ++++++++++++++++++-
 2 files changed, 46 insertions(+), 6 deletions(-)
Signature · 1 line
2.54.0