android_kernel_samsung_msm8976/net
Sabrina Dubroca 2f97a86170 xfrm: fix stack access out of bounds with CONFIG_XFRM_SUB_POLICY
commit 9b3eb54106cf6acd03f07cf0ab01c13676a226c2 upstream.

When CONFIG_XFRM_SUB_POLICY=y, xfrm_dst stores a copy of the flowi for
that dst. Unfortunately, the code that allocates and fills this copy
doesn't care about what type of flowi (flowi, flowi4, flowi6) gets
passed. In multiple code paths (from raw_sendmsg, from TCP when
replying to a FIN, in vxlan, geneve, and gre), the flowi that gets
passed to xfrm is actually an on-stack flowi4, so we end up reading
stuff from the stack past the end of the flowi4 struct.

Since xfrm_dst->origin isn't used anywhere following commit
ca116922af ("xfrm: Eliminate "fl" and "pol" args to
xfrm_bundle_ok()."), just get rid of it.  xfrm_dst->partner isn't used
either, so get rid of that too.

Fixes: 9d6ec93801 ("ipv4: Use flowi4 in public route lookup interfaces.")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
[bwh: Backported to 3.2: deleted code is slightly different]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-07-27 21:44:51 +02:00
..
9p
802
8021q
appletalk
atm
ax25 Import latest Samsung release 2017-04-18 03:43:52 +02:00
batman-adv batman-adv: Fix broadcast/ogm queue limit on a removed interface 2016-06-07 10:42:53 +02:00
bluetooth Bluetooth: Fix user channel for 32bit userspace on 64bit kernel 2019-07-27 21:44:45 +02:00
bridge Revert "netfilter: ensure number of counters is >0 in do_replace()" 2019-07-27 21:41:44 +02:00
caif
can
ceph libceph: introduce ceph_crypt() for in-place en/decryption 2017-04-22 23:02:50 +02:00
core net: Set sk_prot_creator when cloning sockets to the right proto 2019-07-27 21:44:32 +02:00
dcb
dccp dccp: fix memory leak during tear-down of unsuccessful connection request 2019-07-27 21:44:01 +02:00
decnet Import latest Samsung release 2017-04-18 03:43:52 +02:00
dns_resolver
dsa
ethernet
ieee802154
ipc_router net: ipc_router: Remove duplicate client port check 2017-04-22 23:02:47 +02:00
ipv4 tcp: eliminate negative reordering in tcp_clean_rtx_queue 2019-07-27 21:44:46 +02:00
ipv6 ipv6: Fix leak in ipv6_gso_segment(). 2019-07-27 21:44:50 +02:00
ipx ipx: call ipxitf_put() in ioctl error path 2018-01-21 21:05:49 -08:00
irda irda: Fix lockdep annotations in hashbin_delete(). 2017-04-22 23:02:49 +02:00
iucv
key af_key: Fix slab-out-of-bounds in pfkey_compile_policy. 2019-07-27 21:44:45 +02:00
l2tp l2tp: avoid use-after-free caused by l2tp_ip_backlog_recv 2019-07-27 21:43:59 +02:00
lapb
llc net/llc: avoid BUG_ON() in skb_orphan() 2017-04-22 23:03:00 +02:00
mac80211 This is the 3.10.101 stable release 2017-04-18 17:17:55 +02:00
mac802154
netfilter netfilter: ctnetlink: fix incorrect nf_ct_put during hash resize 2019-07-27 21:44:51 +02:00
netlabel netlabel: add address family checks to netlbl_{sock,req}_delattr() 2019-07-27 21:41:59 +02:00
netlink netlink: Fix dump skb leak/double free 2017-04-22 23:02:56 +02:00
netrom
nfc
openvswitch
packet packet: fix tp_reserve race in packet_set_ring 2019-07-27 21:44:40 +02:00
phonet This is the 3.10.96 stable release 2017-04-18 17:16:02 +02:00
rds This is the 3.10.99 stable release 2017-04-18 17:17:46 +02:00
rfkill net: rfkill: Do not ignore errors from regulator_enable() 2019-07-27 21:42:01 +02:00
rmnet_data net: rmnet_data: Add support to configure custom device name 2018-09-05 18:14:57 +02:00
rose
rxrpc rxrpc: Fix several cases where a padded len isn't checked in ticket decode 2019-07-27 21:44:13 +02:00
sched net sched actions: decrement module reference count after table flush. 2019-07-27 21:43:13 +02:00
sctp sctp: fully initialize the IPv6 address in sctp_v6_to_addr() 2019-07-27 21:44:28 +02:00
sunrpc svcrpc: fix oops in absence of krb5 module 2019-07-27 21:43:03 +02:00
tipc
unix af_unix: move unix_mknod() out of bindlock 2019-07-27 21:43:50 +02:00
vmw_vsock VSOCK: do not disconnect socket when peer has shutdown SEND only 2016-06-07 10:42:54 +02:00
wimax
wireless cfg80211: Validate frequencies nested in NL80211_ATTR_SCAN_FREQUENCIES 2019-07-27 21:44:37 +02:00
x25 net: fix a kernel infoleak in x25 module 2016-06-07 10:42:54 +02:00
xfrm xfrm: fix stack access out of bounds with CONFIG_XFRM_SUB_POLICY 2019-07-27 21:44:51 +02:00
Kconfig
Makefile
activity_stats.c
compat.c
nonet.c
socket.c net: socket: fix recvmmsg not returning error from sock_error 2019-07-27 21:43:06 +02:00
sysctl_net.c