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:   Fri, 29 May 2020 17:27:19 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     willemdebruijn.kernel@...il.com
Cc:     netdev@...r.kernel.org, willemb@...gle.com
Subject: Re: [PATCH net] tun: correct header offsets in napi frags mode

From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Date: Thu, 28 May 2020 13:05:32 -0400

> Temporarily pull ETH_HLEN to make control flow the same for frags and
> not frags. Then push the header just before calling napi_gro_frags.
 ...
>  	case IFF_TAP:
> -		if (!frags)
> -			skb->protocol = eth_type_trans(skb, tun->dev);
> +		if (frags && !pskb_may_pull(skb, ETH_HLEN)) {
> +			err = -ENOMEM;
> +			goto drop;
> +		}
> +		skb->protocol = eth_type_trans(skb, tun->dev);
 ...
>  		/* Exercise flow dissector code path. */
> -		u32 headlen = eth_get_headlen(tun->dev, skb->data,
> -					      skb_headlen(skb));
> +		skb_push(skb, ETH_HLEN);
> +		headlen = eth_get_headlen(tun->dev, skb->data,
> +					  skb_headlen(skb));

I hate to be a stickler on wording in the commit message, but the
change is not really "pulling" the ethernet header from the SKB.

Instead it is invoking pskb_may_pull() which just makes sure the
header is there in the linear SKB data area.

Can you please refine this description and resubmit?

Thank you.

Powered by blists - more mailing lists