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 bridge interface removal?
Date: Fri, 14 May 2004 15:46:19 +0200	[thread overview]
Message-ID: <1084542378.17594.12.camel@wintermute.xmldesign.de> (raw)

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


             reply	other threads:[~2004-05-14 13:46 UTC|newest]

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

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=1084542378.17594.12.camel@wintermute.xmldesign.de \
    --to=erich@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: Bug in bridge interface removal?' \
    /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).