Netdev List
 help / color / mirror / Atom feed
* [PATCH net 0/2] net: bridge: vlan: fix memory leak & null pointer deref
@ 2026-09-11 10:06 Nikolay Aleksandrov
  2026-09-11 10:06 ` [PATCH net 1/2] net: bridge: vlan: fix leaks on switchdev deletion errors Nikolay Aleksandrov
  2026-09-11 10:06 ` [PATCH net 2/2] net: bridge: vlan: avoid NULL dereference on flush errors Nikolay Aleksandrov
  0 siblings, 2 replies; 3+ messages in thread
From: Nikolay Aleksandrov @ 2026-09-11 10:06 UTC (permalink / raw)
  To: netdev
  Cc: idosch, davem, edumazet, kuba, pabeni, horms, petrm,
	vladimir.oltean, bridge, Nikolay Aleksandrov

Hi,
These are two issues I found while reworking the bridge vlan fast-path.
I need to fix them before I can post my larger patch-sets because they
will make these bugs more visible and easy to trigger.

Patch 01 fixes memory leaks on the vlan flush path (teardown). These have
existed since I converted the VLAN code to use rhashtables, but are hard
to hit because they require __vlan_vid_del or switch dev error to hit.
It is ok to abort vlan deletion when removing a single vlan, but we must
free their resources on teardown otherwise they're left dangling.

Patch 02 fixes a NULL pointer deref that is a consequence of patch 01's
bug. If the vlan delete fails when removing a bridge device vlan, the
error printing will try to dereference the port which is NULL.

Thanks,
 Nik

Nikolay Aleksandrov (2):
  net: bridge: vlan: fix leaks on switchdev deletion errors
  net: bridge: vlan: avoid NULL dereference on flush errors

 net/bridge/br_vlan.c | 31 +++++++++++++++++++------------
 1 file changed, 19 insertions(+), 12 deletions(-)

-- 
2.47.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-11 10:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11 10:06 [PATCH net 0/2] net: bridge: vlan: fix memory leak & null pointer deref Nikolay Aleksandrov
2026-09-11 10:06 ` [PATCH net 1/2] net: bridge: vlan: fix leaks on switchdev deletion errors Nikolay Aleksandrov
2026-09-11 10:06 ` [PATCH net 2/2] net: bridge: vlan: avoid NULL dereference on flush errors Nikolay Aleksandrov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox