netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: alexey.kodanev@oracle.com
Cc: netdev@vger.kernel.org, tom@herbertland.com
Subject: Re: [PATCH net] udplite: fix partial checksum initialization
Date: Fri, 16 Feb 2018 15:58:26 -0500 (EST)	[thread overview]
Message-ID: <20180216.155826.1914997978700216998.davem@davemloft.net> (raw)
In-Reply-To: <1518715123-5990-1-git-send-email-alexey.kodanev@oracle.com>

From: Alexey Kodanev <alexey.kodanev@oracle.com>
Date: Thu, 15 Feb 2018 20:18:43 +0300

> Since UDP-Lite is always using checksum, the following path is
> triggered when calculating pseudo header for it:
> 
>   udp4_csum_init() or udp6_csum_init()
>     skb_checksum_init_zero_check()
>       __skb_checksum_validate_complete()
> 
> The problem can appear if skb->len is less than CHECKSUM_BREAK. In
> this particular case __skb_checksum_validate_complete() also invokes
> __skb_checksum_complete(skb). If UDP-Lite is using partial checksum
> that covers only part of a packet, the function will return bad
> checksum and the packet will be dropped.
> 
> It can be fixed if we skip skb_checksum_init_zero_check() and only
> set the required pseudo header checksum for UDP-Lite with partial
> checksum before udp4_csum_init()/udp6_csum_init() functions return.
> 
> Fixes: ed70fcfcee95 ("net: Call skb_checksum_init in IPv4")
> Fixes: e4f45b7f40bd ("net: Call skb_checksum_init in IPv6")
> Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>

Applied and queued up for -stable, thanks Alexey.

      reply	other threads:[~2018-02-16 20:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15 17:18 [PATCH net] udplite: fix partial checksum initialization Alexey Kodanev
2018-02-16 20:58 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180216.155826.1914997978700216998.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alexey.kodanev@oracle.com \
    --cc=netdev@vger.kernel.org \
    --cc=tom@herbertland.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).