lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1401163394.5367.235.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Mon, 26 May 2014 21:03:14 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Sven Wegener <sven.wegener@...aler.net>
Cc:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH] ipv6: Fix regression caused by efe4208 in
 udp_v6_mcast_next()

On Sun, 2014-05-25 at 16:14 +0200, Sven Wegener wrote:
> Commit efe4208 ("ipv6: make lookups simpler and faster") introduced a
> regression in udp_v6_mcast_next(), resulting in multicast packets not
> reaching the destination sockets under certain conditions.
> 
> The packet's IPv6 addresses are wrongly compared to the IPv6 addresses
> from the function's socket argument, which indicates the starting point
> for looping, instead of the loop variable. If the addresses from the
> first socket do not match the packet's addresses, no socket in the list
> will match.
> 
> Fix this by shrinking the function to use one variable for the socket to
> avoid confusion in the future.

Thanks for fixing this bug.

Please do not mix a cleanup and a fix in same patch, especially for
a stable candidate.

Your fix is obvious when reduced to this :

diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 1e586d92260e..20b63d2ab70f 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -716,15 +716,15 @@ static struct sock *udp_v6_mcast_next(struct net *net, struct sock *sk,
 				if (inet->inet_dport != rmt_port)
 					continue;
 			}
-			if (!ipv6_addr_any(&sk->sk_v6_daddr) &&
-			    !ipv6_addr_equal(&sk->sk_v6_daddr, rmt_addr))
+			if (!ipv6_addr_any(&s->sk_v6_daddr) &&
+			    !ipv6_addr_equal(&s->sk_v6_daddr, rmt_addr))
 				continue;
 
 			if (s->sk_bound_dev_if && s->sk_bound_dev_if != dif)
 				continue;
 
-			if (!ipv6_addr_any(&sk->sk_v6_rcv_saddr)) {
-				if (!ipv6_addr_equal(&sk->sk_v6_rcv_saddr, loc_addr))
+			if (!ipv6_addr_any(&s->sk_v6_rcv_saddr)) {
+				if (!ipv6_addr_equal(&s->sk_v6_rcv_saddr, loc_addr))
 					continue;
 			}
 			if (!inet6_mc_check(s, loc_addr, rmt_addr))





--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ