1
0
Fork 0
remarkable-linux/net/ipv6
Alexey Kodanev 5984901390 udplite: fix partial checksum initialization
[ Upstream commit 15f35d49c9 ]

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: ed70fcfcee ("net: Call skb_checksum_init in IPv4")
Fixes: e4f45b7f40 ("net: Call skb_checksum_init in IPv6")
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-11 16:21:32 +01:00
..
ila ila_xlat: add missing hash secret initialization 2017-06-24 07:11:12 +02:00
netfilter netfilter: on sockopt() acquire sock lock only in the required scope 2018-02-25 11:05:43 +01:00
Kconfig fou: fix IPv6 Kconfig options 2016-05-31 14:07:49 -07:00
Makefile Merge branch 'stable-4.8' of git://git.infradead.org/users/pcmoore/selinux into next 2016-07-07 10:15:34 +10:00
addrconf.c net: ipv6: send NS for DAD when link operationally up 2017-12-25 14:23:45 +01:00
addrconf_core.c ipv6: change ipv6_stub_impl.ipv6_dst_lookup to take net argument 2015-07-31 15:21:30 -07:00
addrlabel.c ipv6/addrlabel: fix ip6addrlbl_get() 2015-12-22 15:57:54 -05:00
af_inet6.c ipv6: Fix SO_REUSEPORT UDP socket with implicit sk_ipv6only 2018-02-13 12:35:57 +01:00
ah6.c ah6: fix error return code 2015-08-25 13:37:31 -07:00
anycast.c ipv6: coding style: comparison for equality with NULL 2015-03-31 13:51:54 -04:00
calipso.c net/ipv6: Fix CALIPSO causing GPF with datagram support 2017-06-14 15:05:52 +02:00
datagram.c ipv6: Handle IPv4-mapped src to in6addr_any dst. 2017-06-17 06:41:49 +02:00
esp6.c esp6: Fix integrity verification when ESN are used 2016-11-30 11:10:16 +01:00
exthdrs.c Merge branch 'stable-4.8' of git://git.infradead.org/users/pcmoore/selinux into next 2016-07-07 10:15:34 +10:00
exthdrs_core.c ipv6: constify the skb pointer of ipv6_find_tlv(). 2016-06-27 15:06:15 -04:00
exthdrs_offload.c ipv6: fix exthdrs offload registration in out_rt path 2015-09-02 15:31:00 -07:00
fib6_rules.c ipv6: Do not leak throw route references 2017-07-05 14:40:16 +02:00
fou6.c fou: add Kconfig options for IPv6 support 2016-05-29 22:24:21 -07:00
icmp.c net: handle no dst on skb in icmp6_send 2016-11-28 16:13:01 -05:00
inet6_connection_sock.c tcp: don't annotate mark on control socket from tcp_v6_send_response() 2017-02-18 15:11:44 +01:00
inet6_hashtables.c inet: Fix missing return value in inet6_hash 2016-10-29 12:01:49 -04:00
ip6_checksum.c udplite: fix partial checksum initialization 2018-03-11 16:21:32 +01:00
ip6_fib.c ipv6: fix typo in fib6_net_exit() 2017-09-20 08:19:56 +02:00
ip6_flowlabel.c ipv6: flowlabel: do not leave opt->tot_len with garbage 2017-11-18 11:22:22 +01:00
ip6_gre.c ip6_gre: init dev->mtu and dev->hard_header_len correctly 2018-01-31 12:55:55 +01:00
ip6_icmp.c ipv6: icmp: add a force_saddr param to icmp6_send() 2016-06-18 22:11:38 -07:00
ip6_input.c net: vrf: ipv6 support for local traffic to local addresses 2016-06-08 00:25:38 -07:00
ip6_offload.c gso: fix payload length when gso_size is zero 2017-11-18 11:22:20 +01:00
ip6_offload.h udp: Add GRO functions to UDP socket 2016-04-07 16:53:29 -04:00
ip6_output.c ipv6: ip6_make_skb() needs to clear cork.base.dst 2018-01-31 12:55:54 +01:00
ip6_tunnel.c ip6_tunnel: get the min mtu properly in ip6_tnl_xmit 2018-03-03 10:23:23 +01:00
ip6_udp_tunnel.c ip6_udp_tunnel: remove unused IPCB related codes 2016-11-02 15:18:36 -04:00
ip6_vti.c vti6: Don't report path MTU below IPV6_MIN_MTU. 2017-12-14 09:28:16 +01:00
ip6mr.c ip6mr: fix stale iterator 2018-02-13 12:35:56 +01:00
ipcomp6.c ipv6: White-space cleansing : Structure layouts 2014-08-24 22:37:52 -07:00
ipv6_sockglue.c netfilter: drop outermost socket lock in getsockopt() 2018-02-28 10:18:30 +01:00
mcast.c ipv6: mcast: better catch silly mtu values 2018-01-02 20:35:10 +01:00
mcast_snoop.c net: fix wrong skb_get() usage / crash in IGMP/MLD parsing code 2015-08-13 17:08:39 -07:00
mip6.c ipv6: use ktime_t for internal timestamps 2015-10-05 03:16:47 -07:00
ndisc.c net: l3mdev: remove redundant calls 2016-09-10 23:12:52 -07:00
netfilter.c ipv6: Pass struct net into ip6_route_me_harder 2015-09-29 20:21:32 +02:00
output_core.c ipv6: accept 64k - 1 packet length in ip6_find_1stfragopt() 2017-09-20 08:19:52 +02:00
ping.c net: ping: do not abuse udp_poll() 2017-06-14 15:05:52 +02:00
proc.c proc: snmp6: Use correct type in memset 2017-07-05 14:40:15 +02:00
protocol.c net: Export inet_offloads and inet6_offloads 2014-09-19 17:15:31 -04:00
raw.c net: ping: do not abuse udp_poll() 2017-06-14 15:05:52 +02:00
reassembly.c Revert "net: fix percpu memory leaks" 2017-09-20 08:19:55 +02:00
route.c ipv6: icmp6: Allow icmp messages to be looped back 2018-03-03 10:23:21 +01:00
sit.c ipv6 sit: work around bogus gcc-8 -Wrestrict warning 2018-03-11 16:21:31 +01:00
syncookies.c ipv4: ipv6: initialize treq->txhash in cookie_v[46]_check() 2017-08-11 08:49:32 -07:00
sysctl_net_ipv6.c calipso: Add a label cache. 2016-06-27 15:06:17 -04:00
tcp_ipv6.c tcp md5sig: Use skb's saddr when replying to an incoming segment 2018-01-02 20:35:11 +01:00
tcpv6_offload.c gso: validate gso_type in GSO handlers 2018-01-31 12:55:55 +01:00
tunnel6.c ipv6: fix tunnel error handling 2015-11-03 10:52:13 -05:00
udp.c udpv6: Fix the checksum computation when HW checksum does not apply 2017-10-12 11:51:20 +02:00
udp_impl.h udplite: call proper backlog handlers 2016-11-24 15:32:14 -05:00
udp_offload.c gso: validate gso_type in GSO handlers 2018-01-31 12:55:55 +01:00
udplite.c udplite: call proper backlog handlers 2016-11-24 15:32:14 -05:00
xfrm6_input.c vti6: fix input path 2016-09-21 10:09:14 +02:00
xfrm6_mode_beet.c xfrm: simplify xfrm_address_t use 2015-03-31 13:58:35 -04:00
xfrm6_mode_ro.c ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt() 2017-06-14 15:05:51 +02:00
xfrm6_mode_transport.c ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt() 2017-06-14 15:05:51 +02:00
xfrm6_mode_tunnel.c ipv6: update skb->csum when CE mark is propagated 2016-01-15 15:07:23 -05:00
xfrm6_output.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-10-24 06:54:12 -07:00
xfrm6_policy.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-09-12 15:52:44 -07:00
xfrm6_protocol.c xfrm6: Properly handle unsupported protocols 2014-05-06 07:08:38 +02:00
xfrm6_state.c ipv6: White-space cleansing : Line Layouts 2014-08-24 22:37:52 -07:00
xfrm6_tunnel.c vti6: fix input path 2016-09-21 10:09:14 +02:00