LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Erich Schubert <erich@debian.org>
To: linux-kernel@vger.kernel.org
Subject: Bug in interface removal from bridges.
Date: Thu, 20 May 2004 14:44:08 +0200	[thread overview]
Message-ID: <1085057048.13106.5.camel@wintermute.xmldesign.de> (raw)
In-Reply-To: <1084542378.17594.12.camel@wintermute.xmldesign.de>

Hi,
this is the straight backport from 2.6.5 of the fix.
Can someone with authority review this and forward it to marcelo for
inclusion in the next 2.4.x release?

To verify your system is vulnerable (need bridge support):
$ brctl addbr br0
$ brctl addbr br1
$ brctl addif br0 eth0
$ brctl delif br1 eth0
(note br1 in last line, not br0!)

Here's the fix as taken from 2.6:
(fixed sometime in 2.5.x it seems; it might be worth looking at when
this was fixed - it might contain other fixes, too.)

--- net/bridge/br_if.c.2.4.21	2004-05-20 14:34:50.000000000 +0200
+++ net/bridge/br_if.c	2004-05-20 14:37:22.000000000 +0200
@@ -254,6 +254,10 @@
 int br_del_if(struct net_bridge *br, struct net_device *dev)
 {
 	int retval;
+	struct net_bridge_port *p;
+
+	if ((p = dev->br_port) == NULL || p->br != br)
+		return -EINVAL;
 
 	br_write_lock_bh(BR_NETPROTO_LOCK);
 	write_lock(&br->lock);

Greetings,
Erich


      parent reply	other threads:[~2004-05-20 12:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-14 13:46 Bug in bridge interface removal? Erich Schubert
2004-05-14 13:48 ` Erich Schubert
2004-05-20 12:44 ` Erich Schubert [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1085057048.13106.5.camel@wintermute.xmldesign.de \
    --to=erich@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: Bug in interface removal from bridges.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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