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] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 18 May 2015 13:22:45 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Henning Rogge <hrogge@...il.com>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
	David Held <drheld@...gle.com>
Subject: Re: [PATCH] net/ipv6/udp: Fix ipv6 multicast socket filter
 regression

On Mon, 2015-05-18 at 21:08 +0200, Henning Rogge wrote:
> Commit <5cf3d46192fc> ("udp: Simplify__udp*_lib_mcast_deliver")
> simplified the filter for incoming IPv6 multicast but removed
> the check of the local socket address and the UDP destination
> address.
> 
> This patch restores the filter to prevent sockets bound to a IPv6
> multicast IP to receive other UDP traffic link unicast.
> 
> Signed-off-by: Henning Rogge <hrogge@...il.com>
> Fixes: 5cf3d46192fc ("udp: Simplify__udp*_lib_mcast_deliver")
> Cc: "David S. Miller" <davem@...emloft.net>
> ---
> The commit above was found by me with a git bisect. I think the
> patch should be included into the stable kernel trees.
> ---
>  net/ipv6/udp.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
> index 3477c919fcc8..c2ec41617a35 100644
> --- a/net/ipv6/udp.c
> +++ b/net/ipv6/udp.c
> @@ -731,7 +731,9 @@ static bool __udp_v6_is_mcast_sock(struct net *net, struct sock *sk,
>  	    (inet->inet_dport && inet->inet_dport != rmt_port) ||
>  	    (!ipv6_addr_any(&sk->sk_v6_daddr) &&
>  		    !ipv6_addr_equal(&sk->sk_v6_daddr, rmt_addr)) ||
> -	    (sk->sk_bound_dev_if && sk->sk_bound_dev_if != dif))
> +	    (sk->sk_bound_dev_if && sk->sk_bound_dev_if != dif) ||
> +	    (!ipv6_addr_any(&sk->sk_v6_rcv_saddr) &&
> +		    !ipv6_addr_equal(&sk->sk_v6_rcv_saddr, loc_addr)))
>  		return false;
>  	if (!inet6_mc_check(sk, loc_addr, rmt_addr))
>  		return false;


Nice catch. I've CC faulty commit author.

Acked-by: Eric Dumazet <edumazet@...gle.com>


--
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