Skip to contentSkip to conversation

Revert "bridge: only expire the mdb entry when query is received"

PATCH Applied Linus Lüssing 5 participants 6 messages Oct 19, 2013 – Oct 22, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "bridge: only expire the mdb entry when query is received"

While this commit was a good attempt to fix issues occuring when no multicast querier is present, this commit still has two more issues:

1) There are cases where mdb entries do not expire even if there is a querier present. The bridge will unnecessarily continue flooding multicast packets on the according ports.

2) Never removing an mdb entry could be exploited for a Denial of Service by an attacker on the local link, slowly, but steadily eating up all memory.

Actually, this commit became obsolete with
"bridge: disable snooping if there is no querier" (b00589af3b) which included fixes for a few more cases.

Therefore reverting the following commits (the commit stated in the commit message plus three of its follow up fixes):

---
Revert "bridge: update mdb expiration timer upon reports." This reverts commit f144febd93d5ee534fdf23505ab091b2b9088edc. Revert "bridge: do not call setup_timer() multiple times" This reverts commit 1faabf2aab1fdaa1ace4e8c829d1b9cf7bfec2f1. Revert "bridge: fix some kernel warning in multicast timer" This reverts commit c7e8e8a8f7a70b343ca1e0f90a31e35ab2d16de1. Revert "bridge: only expire the mdb entry when query is received" This reverts commit 9f00b2e7cf241fa389733d41b615efdaa2cb0f5b.
---

---
 net/bridge/br_mdb.c       |    2 +-
 net/bridge/br_multicast.c |   47 ++++++++++++++++++++++++++-------------------
 net/bridge/br_private.h   |    1 -
 3 files changed, 28 insertions(+), 22 deletions(-)
net/bridge/br_mdb.c +1 -1
index 85a09bb..b7b1914 100644
@@ -453,7 +453,7 @@ static int __br_mdb_del(struct net_bridge *br, struct br_mdb_entry *entry)
 		call_rcu_bh(&p->rcu, br_multicast_free_pg);
 		err = 0;
 
-		if (!mp->ports && !mp->mglist && mp->timer_armed &&
+		if (!mp->ports && !mp->mglist &&
 		    netif_running(br->dev))
 			mod_timer(&mp->timer, jiffies);
 		break;
net/bridge/br_multicast.c +27 -20

124 lines not on this page · raw message

net/bridge/br_private.h +0 -1
index 7ca2ae4..e14c33b 100644
@@ -126,7 +126,6 @@ struct net_bridge_mdb_entry
 	struct timer_list		timer;
 	struct br_ip			addr;
 	bool				mglist;
-	bool				timer_armed;
 };
 
 struct net_bridge_mdb_htable
Signature · 1 line
1.7.10.4
maintainer
#1 lore raw

From: Linus Lüssing <[email protected]>
Date: Sun, 20 Oct 2013 00:58:57 +0200

Quoted 18 lines

While this commit was a good attempt to fix issues occuring when no multicast querier is present, this commit still has two more issues:

1) There are cases where mdb entries do not expire even if there is a querier present. The bridge will unnecessarily continue flooding multicast packets on the according ports.

2) Never removing an mdb entry could be exploited for a Denial of Service by an attacker on the local link, slowly, but steadily eating up all memory.

Actually, this commit became obsolete with
"bridge: disable snooping if there is no querier" (b00589af3b) which included fixes for a few more cases.

Therefore reverting the following commits (the commit stated in the commit message plus three of its follow up fixes):

Quoted 10 lines

---
Revert "bridge: update mdb expiration timer upon reports." This reverts commit f144febd93d5ee534fdf23505ab091b2b9088edc. Revert "bridge: do not call setup_timer() multiple times" This reverts commit 1faabf2aab1fdaa1ace4e8c829d1b9cf7bfec2f1. Revert "bridge: fix some kernel warning in multicast timer" This reverts commit c7e8e8a8f7a70b343ca1e0f90a31e35ab2d16de1. Revert "bridge: only expire the mdb entry when query is received" This reverts commit 9f00b2e7cf241fa389733d41b615efdaa2cb0f5b.
---

Cong, and other bridge folks, please review this revert.

Thanks.

Reviewed-by
#2 lore raw
Quoted 32 lines · David Miller

From: Linus Lüssing <[email protected]>
Date: Sun, 20 Oct 2013 00:58:57 +0200

Quoted 18 lines

While this commit was a good attempt to fix issues occuring when no multicast querier is present, this commit still has two more issues:

1) There are cases where mdb entries do not expire even if there is a querier present. The bridge will unnecessarily continue flooding multicast packets on the according ports.

2) Never removing an mdb entry could be exploited for a Denial of Service by an attacker on the local link, slowly, but steadily eating up all memory.

Actually, this commit became obsolete with
"bridge: disable snooping if there is no querier" (b00589af3b) which included fixes for a few more cases.

Therefore reverting the following commits (the commit stated in the commit message plus three of its follow up fixes):

Quoted 10 lines

---
Revert "bridge: update mdb expiration timer upon reports." This reverts commit f144febd93d5ee534fdf23505ab091b2b9088edc. Revert "bridge: do not call setup_timer() multiple times" This reverts commit 1faabf2aab1fdaa1ace4e8c829d1b9cf7bfec2f1. Revert "bridge: fix some kernel warning in multicast timer" This reverts commit c7e8e8a8f7a70b343ca1e0f90a31e35ab2d16de1. Revert "bridge: only expire the mdb entry when query is received" This reverts commit 9f00b2e7cf241fa389733d41b615efdaa2cb0f5b.
---

Quoted 2 lines

Cong, and other bridge folks, please review this revert.

Makes sense and make the implementation better follow the spec. Looks like the issues seen before are resolved by the revert.

#3 lore raw
In reply to David Miller
Quoted 32 lines · David Miller

From: Linus Lüssing <[email protected]>
Date: Sun, 20 Oct 2013 00:58:57 +0200

Quoted 18 lines

While this commit was a good attempt to fix issues occuring when no multicast querier is present, this commit still has two more issues:

1) There are cases where mdb entries do not expire even if there is a querier present. The bridge will unnecessarily continue flooding multicast packets on the according ports.

2) Never removing an mdb entry could be exploited for a Denial of Service by an attacker on the local link, slowly, but steadily eating up all memory.

Actually, this commit became obsolete with
"bridge: disable snooping if there is no querier" (b00589af3b) which included fixes for a few more cases.

Therefore reverting the following commits (the commit stated in the commit message plus three of its follow up fixes):

Quoted 10 lines

---
Revert "bridge: update mdb expiration timer upon reports." This reverts commit f144febd93d5ee534fdf23505ab091b2b9088edc. Revert "bridge: do not call setup_timer() multiple times" This reverts commit 1faabf2aab1fdaa1ace4e8c829d1b9cf7bfec2f1. Revert "bridge: fix some kernel warning in multicast timer" This reverts commit c7e8e8a8f7a70b343ca1e0f90a31e35ab2d16de1. Revert "bridge: only expire the mdb entry when query is received" This reverts commit 9f00b2e7cf241fa389733d41b615efdaa2cb0f5b.
---

Quoted 2 lines

Cong, and other bridge folks, please review this revert.

t http://vger.kernel.org/majordomo-info.html

Quoted 1 line

Makes sense and make the implementation better follow the spec. Looks like the issues seen before are resolved by the revert.

-vlad

#4 lore raw
In reply to Linus Lüssing
Quoted 11 lines · Linus Lüssing

While this commit was a good attempt to fix issues occuring when no multicast querier is present, this commit still has two more issues:

1) There are cases where mdb entries do not expire even if there is a querier present. The bridge will unnecessarily continue flooding multicast packets on the according ports.

2) Never removing an mdb entry could be exploited for a Denial of Service by an attacker on the local link, slowly, but steadily eating up all memory.

I raised the first issue too when I sent the patch, but Herbert said it is not a problem. So, I will leave this to Herbert to decide.

For me, your patch makes sense.

Thanks.

maintainer Applied
#5 lore raw
In reply to Linus Lüssing

From: Linus Lüssing <[email protected]>
Date: Sun, 20 Oct 2013 00:58:57 +0200

Quoted 29 lines

While this commit was a good attempt to fix issues occuring when no multicast querier is present, this commit still has two more issues:

1) There are cases where mdb entries do not expire even if there is a querier present. The bridge will unnecessarily continue flooding multicast packets on the according ports.

2) Never removing an mdb entry could be exploited for a Denial of Service by an attacker on the local link, slowly, but steadily eating up all memory.

Actually, this commit became obsolete with
"bridge: disable snooping if there is no querier" (b00589af3b) which included fixes for a few more cases.

Therefore reverting the following commits (the commit stated in the commit message plus three of its follow up fixes):

---
Revert "bridge: update mdb expiration timer upon reports." This reverts commit f144febd93d5ee534fdf23505ab091b2b9088edc. Revert "bridge: do not call setup_timer() multiple times" This reverts commit 1faabf2aab1fdaa1ace4e8c829d1b9cf7bfec2f1. Revert "bridge: fix some kernel warning in multicast timer" This reverts commit c7e8e8a8f7a70b343ca1e0f90a31e35ab2d16de1. Revert "bridge: only expire the mdb entry when query is received" This reverts commit 9f00b2e7cf241fa389733d41b615efdaa2cb0f5b.
---

Quoted 2 lines

Applied, thanks a lot.