LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Bug in bridge interface removal?
@ 2004-05-14 13:46 Erich Schubert
  2004-05-14 13:48 ` Erich Schubert
  2004-05-20 12:44 ` Bug in interface removal from bridges Erich Schubert
  0 siblings, 2 replies; 3+ messages in thread
From: Erich Schubert @ 2004-05-14 13:46 UTC (permalink / raw)
  To: linux-kernel

Hi, on an embedded system i had a crash when doing the following
(invalid) sequence of commands:
Note that this is an outdated kernel, 2.4.19-uc1 with some
modifications; i'm not sure if this is maybe already fixed.

brctl addbr br0
brctl addbr br1
brctl addif br0 eth0
brctl delif br1 eth0
(causing a kernel crash after a second)

yes, i'm deleting the interface from the wrong bridge. Since this
requires root privileges, this isn't much of an "exploit" or so. But it
takes down the system reliably here (but it is an MMUless ARM, you can
take that one down really easy...)

Having a short look at the source i didn't see any safety measure in
http://lxr.linux.no/source/net/bridge/br_if.c#L254
(Neither in 2.4.x, nor in 2.6.x)

I'd suggest adding the following line to the beginning of br_del_if:

if (dev->br_port->br != br) return -EINVAL;

After adding this line i get
  device eth1 is not a slave of br0
instead of the reboot.

Greetings,
Erich


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

end of thread, other threads:[~2004-05-20 12:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-14 13:46 Bug in bridge interface removal? Erich Schubert
2004-05-14 13:48 ` Erich Schubert
2004-05-20 12:44 ` Bug in interface removal from bridges Erich Schubert

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).