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:	Wed, 18 Mar 2015 10:04:10 -0400
From:	Vlad Yasevich <vyasevic@...hat.com>
To:	Sabrina Dubroca <sd@...asysnail.net>, davem@...emloft.net
CC:	netdev@...r.kernel.org, matt@...tgrant.net.nz
Subject: Re: [PATCH net] ipv6: skip __ipv6_select_ident when there is no skb_dst

On 03/18/2015 09:52 AM, Sabrina Dubroca wrote:
> Matt Grant reported frequent crashes in ipv6_select_ident when
> udp6_ufo_fragment is called from openvswitch on a skb that doesn't
> have a dst_entry set.
> 
> Skip __ipv6_select_ident in case of a NULL rt.
> 
> Fixes: 0508c07f5e0c ("ipv6: Select fragment id during UFO segmentation if not set.")
> Cc: Vladislav Yasevich <vyasevic@...hat.com>
> Reported-by: Matt Grant <matt@...tgrant.net.nz>
> Tested-by: Matt Grant <matt@...tgrant.net.nz>
> Signed-off-by: Sabrina Dubroca <sd@...asysnail.net>
> ---
> David, can you queue it for stable (3.19)?
> 
>  net/ipv6/output_core.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/net/ipv6/output_core.c b/net/ipv6/output_core.c
> index 74581f706c4d..52b1bc76d5c5 100644
> --- a/net/ipv6/output_core.c
> +++ b/net/ipv6/output_core.c
> @@ -62,12 +62,14 @@ EXPORT_SYMBOL_GPL(ipv6_proxy_select_ident);
>  void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt)
>  {
>  	static u32 ip6_idents_hashrnd __read_mostly;
> -	u32 id;
> +	u32 id = 0;
>  
>  	net_get_random_once(&ip6_idents_hashrnd, sizeof(ip6_idents_hashrnd));
>  
> -	id = __ipv6_select_ident(ip6_idents_hashrnd, &rt->rt6i_dst.addr,
> -				 &rt->rt6i_src.addr);
> +	if (rt)
> +		id = __ipv6_select_ident(ip6_idents_hashrnd, &rt->rt6i_dst.addr,
> +					 &rt->rt6i_src.addr);
> +
>  	fhdr->identification = htonl(id);
>  }
>  EXPORT_SYMBOL(ipv6_select_ident);
> 

Hi Sabrina

This would result in us using id 0 which is not what we want to do.

In this case, udp6_ufo_fragment() should be calling ipv6_proxy_select_ident() so that
the fragment id is properly generated.

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