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]
Message-ID: <8b5a1bc6-c762-0e50-c602-fe4a9876d246@cogentembedded.com>
Date:   Wed, 14 Nov 2018 18:59:02 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Ben Dooks <ben.dooks@...ethink.co.uk>, netdev@...r.kernel.org
Cc:     oneukum@...e.com, davem@...emloft.net, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org, steve.glendinning@...well.net,
        linux-kernel@...ts.codethink.co.uk
Subject: Re: [PATCH 4/4] usbnet: smsc95xx: check for csum being in last four
 bytes

On 11/14/2018 02:50 PM, Ben Dooks wrote:

> The manual states that the checksum cannot lie in the last DWORD of the
> transmission, so add a basic check for this and fall back to software
> checksumming the packet.
> 
> This only seems to trigger for ACK packets with no options or data to
> return to the other end, and the use of the tx-alignment option makes
> it more likely to happen.
> 
> Signed-off-by: Ben Dooks <ben.dooks@...ethink.co.uk>
> ---
> Fixes for v2:
> - Fix spelling of check at Sergei's suggestion
> - Move skb->len check into smsc95xx_can_tx_checksum()
> - Change name of smsc95xx_can_checksum to explicitly say it is tx-csum
> ---
>  drivers/net/usb/smsc95xx.c | 19 ++++++++++++++++++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
> index 8f7c473f3260..cc78ef78cc93 100644
> --- a/drivers/net/usb/smsc95xx.c
> +++ b/drivers/net/usb/smsc95xx.c
> @@ -1997,6 +1997,23 @@ static u32 smsc95xx_calc_csum_preamble(struct sk_buff *skb)
>  	return (high_16 << 16) | low_16;
>  }
>  
> +/* The TX CSUM won't work if the checksum lies in the last 4 bytes of the
> + * transmission. This is fairly unlikely, only seems to trigger with some
> + * short TCP ACK packets sent.
> + *
> + * Note, this calculation should probably check for the alignment of the
> + * data as well, but a straight check for csum being in the last four bytes
> + * of the packet should be ok for now.
> +*/

   Missed a space before */. 

[...]

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ