Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 649e984d authored by Linus Lüssing's avatar Linus Lüssing Committed by David S. Miller
Browse files

bridge: Fix IPv6 multicast snooping by correcting offset in MLDv2 report



We actually want a pointer to the grec_nsrcr and not the following
field. Otherwise we can get very high values for *nsrcs as the first two
bytes of the IPv6 multicast address are being used instead, leading to
a failing pskb_may_pull() which results in MLDv2 reports not being
parsed.

Signed-off-by: default avatarLinus Lüssing <linus.luessing@web.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9cc6e0c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1013,7 +1013,7 @@ static int br_ip6_multicast_mld2_report(struct net_bridge *br,

		nsrcs = skb_header_pointer(skb,
					   len + offsetof(struct mld2_grec,
							  grec_mca),
							  grec_nsrcs),
					   sizeof(_nsrcs), &_nsrcs);
		if (!nsrcs)
			return -EINVAL;