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:   Thu, 28 May 2020 12:35:05 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Ronak Doshi <doshir@...are.com>
Cc:     <netdev@...r.kernel.org>, "VMware, Inc." <pv-drivers@...are.com>,
        "David S. Miller" <davem@...emloft.net>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 net-next 3/4] vmxnet3: add geneve and vxlan tunnel
 offload support

On Thu, 28 May 2020 11:36:14 -0700 Ronak Doshi wrote:
> @@ -1168,13 +1220,21 @@ vmxnet3_rx_csum(struct vmxnet3_adapter *adapter,
>  		    (le32_to_cpu(gdesc->dword[3]) &
>  		     VMXNET3_RCD_CSUM_OK) == VMXNET3_RCD_CSUM_OK) {
>  			skb->ip_summed = CHECKSUM_UNNECESSARY;
> -			BUG_ON(!(gdesc->rcd.tcp || gdesc->rcd.udp));
> -			BUG_ON(gdesc->rcd.frg);
> +			BUG_ON(!(gdesc->rcd.tcp || gdesc->rcd.udp) &&
> +			       !(le32_to_cpu(gdesc->dword[0]) &
> +				 (1UL << VMXNET3_RCD_HDR_INNER_SHIFT)));
> +			BUG_ON(gdesc->rcd.frg &&
> +			       !(le32_to_cpu(gdesc->dword[0]) &
> +				 (1UL << VMXNET3_RCD_HDR_INNER_SHIFT)));
>  		} else if (gdesc->rcd.v6 && (le32_to_cpu(gdesc->dword[3]) &
>  					     (1 << VMXNET3_RCD_TUC_SHIFT))) {
>  			skb->ip_summed = CHECKSUM_UNNECESSARY;
> -			BUG_ON(!(gdesc->rcd.tcp || gdesc->rcd.udp));
> -			BUG_ON(gdesc->rcd.frg);
> +			BUG_ON(!(gdesc->rcd.tcp || gdesc->rcd.udp) &&
> +			       !(le32_to_cpu(gdesc->dword[0]) &
> +				 (1UL << VMXNET3_RCD_HDR_INNER_SHIFT)));
> +			BUG_ON(gdesc->rcd.frg &&
> +			       !(le32_to_cpu(gdesc->dword[0]) &
> +				 (1UL << VMXNET3_RCD_HDR_INNER_SHIFT)));
>  		} else {
>  			if (gdesc->rcd.csum) {
>  				skb->csum = htons(gdesc->rcd.csum);

Seems fairly extreme to trigger BUG_ONs if rx descriptor doesn't
contain valid checksum offload flags :S WARN_ON_ONCE() and ignore 
checsum or drop packet would be more than sufficient.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ