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, 10 Sep 2018 17:36:40 +0200
From:   Jiri Benc <jbenc@...hat.com>
To:     Haishuang Yan <yanhaishuang@...s.chinamobile.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Alexey Kuznetsov <kuznet@....inr.ac.ru>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ip6_gre: simplify gre header parsing in ip6gre_err

On Mon, 10 Sep 2018 16:25:09 +0800, Haishuang Yan wrote:
> +	if (gre_parse_header(skb, &tpi, &csum_err, htons(ETH_P_IPV6),
> +			     offset) < 0) {
> +		if (!csum_err)		/* ignore csum errors. */
> +			return;
>  	}

gre_parse_header stops parsing when csum_err is encountered. Which
means tpi.key is undefined...

>  
> -	if (!pskb_may_pull(skb, offset + grehlen))
> -		return;
>  	ipv6h = (const struct ipv6hdr *)skb->data;
> -	greh = (const struct gre_base_hdr *)(skb->data + offset);
> -	key = key_off ? *(__be32 *)(skb->data + key_off) : 0;
> -
>  	t = ip6gre_tunnel_lookup(skb->dev, &ipv6h->daddr, &ipv6h->saddr,
> -				 key, greh->protocol);
> +				 tpi.key, tpi.proto);

...and can't be used here.

 Jiri

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ