bridge: bad error handling when adding invalid ether address
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): 062c01c9adb4$c12a8e80$b100000a@Stig
PATCH 1/1 bridge: bad error handling when adding invalid ether address
This fixes an crash when empty bond device is added to a bridge. If an interface with invalid ethernet address (all zero) is added to a bridge, then bridge code detects it when setting up the forward databas entry. But the error unwind is broken, the bridge port object can get freed twice: once when ref count went to zeo, and once by kfree. Since object is never really accessible, just free it.
---
Patch against 2.6.29, but same code has been around for a while in older releases, so should apply to 2.6.27.y as well.
net/bridge/br_if.c +0 -1
@@ -426,7 +426,6 @@ err2: err1:kobject_del (&p->kobj); err0: -kobject_put (&p->kobj);dev_set_promiscuity (dev,-1 ); put_back:dev_put (dev);
From: Stephen Hemminger <[email protected]>
Date: Wed, 25 Mar 2009 20:57:00 -0700
Quoted 8 lines
This fixes an crash when empty bond device is added to a bridge. If an interface with invalid ethernet address (all zero) is added to a bridge, then bridge code detects it when setting up the forward databas entry. But the error unwind is broken, the bridge port object can get freed twice: once when ref count went to zeo, and once by kfree. Since object is never really accessible, just free it.
Signed-off-by Stephen Hemminger <[email protected]>
Applied, thanks.