Skip to contentSkip to conversation

ipv4: igmp: fix v3 general query drop monitor false positive

PATCH Applied Daniel Borkmann 3 participants 3 messages Oct 5, 2014 – Oct 6, 2014

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

PATCH 1/1 ipv4: igmp: fix v3 general query drop monitor false positive

In case we find a general query with non-zero number of sources, we are dropping the skb as it's malformed.

RFC3376, section 4.1.8. Number of Sources (N):

This number is zero in a General Query or a Group-Specific Query, and non-zero in a Group-and-Source-Specific Query.

Therefore, reflect that by using kfree_skb() instead of consume_skb().

Fixes d679c5324d9a ("igmp: avoid drop_monitor false positives")

---
[ net-next as it's not really urgent. ]

 net/ipv4/igmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/igmp.c +1 -1
index 4146153..fb70e3e 100644
@@ -931,7 +931,7 @@ static bool igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb,
 			in_dev->mr_qrv = ih3->qrv;
 		if (!group) { /* general query */
 			if (ih3->nsrcs)
-				return false;	/* no sources allowed */
+				return true;	/* no sources allowed */
 			igmp_gq_start_timer(in_dev);
 			return false;
 		}
Signature · 1 line
1.7.11.7
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Daniel Borkmann

In case we find a general query with non-zero number of sources, we are dropping the skb as it's malformed.

RFC3376, section 4.1.8. Number of Sources (N):

Quoted 8 lines

This number is zero in a General Query or a Group-Specific Query, and non-zero in a Group-and-Source-Specific Query.

Therefore, reflect that by using kfree_skb() instead of consume_skb().

Fixes d679c5324d9a ("igmp: avoid drop_monitor false positives")

---

maintainer Applied
#2 lore raw
In reply to Daniel Borkmann

From: Daniel Borkmann <[email protected]>
Date: Sun, 5 Oct 2014 17:27:50 +0200

Quoted 5 lines

In case we find a general query with non-zero number of sources, we are dropping the skb as it's malformed.

RFC3376, section 4.1.8. Number of Sources (N):

Quoted 7 lines

This number is zero in a General Query or a Group-Specific Query, and non-zero in a Group-and-Source-Specific Query.

Therefore, reflect that by using kfree_skb() instead of consume_skb().

Fixes d679c5324d9a ("igmp: avoid drop_monitor false positives")

Applied, thanks Daniel.