android_kernel_samsung_msm8976/net/ipv6
Herbert Xu 8efc061ec7 xfrm: Return error on unknown encap_type in init_state
commit bcfd09f7837f5240c30fd2f52ee7293516641faa upstream.

Currently esp will happily create an xfrm state with an unknown
encap type for IPv4, without setting the necessary state parameters.
This patch fixes it by returning -EINVAL.

There is a similar problem in IPv6 where if the mode is unknown
we will skip initialisation while returning zero.  However, this
is harmless as the mode has already been checked further up the
stack.  This patch removes this anomaly by aligning the IPv6
behaviour with IPv4 and treating unknown modes (which cannot
actually happen) as transport mode.

Fixes: 38320c70d2 ("[IPSEC]: Use crypto_aead and authenc in ESP")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-07-27 21:46:27 +02:00
..
netfilter net: disable fragment reassembly if high_thresh is set to zero 2019-07-27 21:42:34 +02:00
addrconf.c ipv6: fix sparse warning on rt6i_node 2019-07-27 21:45:09 +02:00
addrconf_core.c
addrlabel.c ipv6/addrlabel: fix ip6addrlbl_get() 2016-01-28 21:49:33 -08:00
af_inet6.c ipv6: reorder icmpv6_init() and ip6_mr_init() 2019-07-27 21:45:26 +02:00
ah6.c
anycast.c ipv6: fix rtnl locking in setsockopt for anycast and multicast 2019-07-27 21:42:28 +02:00
datagram.c Merge remote-tracking branch 'f2fs/linux-3.10.y' into HEAD 2017-04-18 17:02:28 +02:00
esp6.c xfrm: Return error on unknown encap_type in init_state 2019-07-27 21:46:27 +02:00
exthdrs.c ipv6: add complete rcu protection around np->opt 2016-09-09 02:36:40 -07:00
exthdrs_core.c This is the 3.10.102 stable release 2017-04-18 17:22:08 +02:00
exthdrs_offload.c ipv6: fix exthdrs offload registration in out_rt path 2015-10-01 12:07:38 +02:00
fib6_rules.c
icmp.c
inet6_connection_sock.c ipv6: add complete rcu protection around np->opt 2016-09-09 02:36:40 -07:00
inet6_hashtables.c
ip6_checksum.c
ip6_fib.c ipv6: fix sparse warning on rt6i_node 2019-07-27 21:45:09 +02:00
ip6_flowlabel.c
ip6_gre.c ip6_gre: skb_push ipv6hdr before packing the header in ip6gre_header 2019-07-27 21:45:52 +02:00
ip6_icmp.c
ip6_input.c ipv6: Make MLD packets to only be processed locally 2015-10-01 12:07:34 +02:00
ip6_offload.c ipv6: Fix leak in ipv6_gso_segment(). 2019-07-27 21:44:50 +02:00
ip6_offload.h
ip6_output.c BACKPORT: ipv6: fix udpv6 sendmsg crash caused by too small MTU 2019-07-27 21:46:07 +02:00
ip6_tunnel.c ipv6: Add rt6_get_cookie() function 2019-07-27 21:45:03 +02:00
ip6mr.c ip6mr: fix notification device destruction 2019-07-27 21:44:08 +02:00
ipcomp6.c
ipv6_sockglue.c ipv6: add complete rcu protection around np->opt 2016-09-09 02:36:40 -07:00
Kconfig
Makefile
mcast.c ipv6: fix rtnl locking in setsockopt for anycast and multicast 2019-07-27 21:42:28 +02:00
mip6.c
ndisc.c ipv6: don't call fib6_run_gc() until routing is ready 2019-07-27 21:42:27 +02:00
netfilter.c
output_core.c ipv6: accept 64k - 1 packet length in ip6_find_1stfragopt() 2019-07-27 21:45:02 +02:00
ping.c net: ping: Return EAFNOSUPPORT when appropriate. 2015-09-16 18:20:13 +05:30
proc.c
protocol.c
raw.c UPSTREAM: ipv4, ipv6: ensure raw socket message is big enough to hold an IP header 2019-07-27 21:45:57 +02:00
reassembly.c net: disable fragment reassembly if high_thresh is set to zero 2019-07-27 21:42:34 +02:00
route.c ipv6: Fix may be used uninitialized warning in rt6_check 2019-07-27 21:45:04 +02:00
sit.c sit: correct IP protocol used in ipip6_err 2019-07-27 21:41:54 +02:00
syncookies.c ipv6: add complete rcu protection around np->opt 2016-09-09 02:36:40 -07:00
sysctl_net_ipv6.c
tcp_ipv6.c tcp md5sig: Use skb's saddr when replying to an incoming segment 2019-07-27 21:46:17 +02:00
tcpv6_offload.c
tunnel6.c
udp.c udp: properly support MSG_PEEK with truncated buffers 2017-04-27 23:58:25 -07:00
udp_impl.h
udp_offload.c net: avoid skb_warn_bad_offload false positives on UFO 2019-07-27 21:45:23 +02:00
udplite.c
xfrm6_input.c xfrm: Reinject transport-mode packets through tasklet 2019-07-27 21:46:20 +02:00
xfrm6_mode_beet.c
xfrm6_mode_ro.c ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt() 2019-07-27 21:44:48 +02:00
xfrm6_mode_transport.c ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt() 2019-07-27 21:44:48 +02:00
xfrm6_mode_tunnel.c
xfrm6_output.c
xfrm6_policy.c ipv6: Add rt6_get_cookie() function 2019-07-27 21:45:03 +02:00
xfrm6_state.c
xfrm6_tunnel.c