remarkable-linux/include
Sabrina Dubroca 1e1666257c xfrm: fix stack access out of bounds with CONFIG_XFRM_SUB_POLICY
commit 9b3eb54106 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-05 14:40:28 +02:00
..
acpi ACPICA: Linuxize: Restore and fix Intel compiler build 2017-02-26 11:10:52 +01:00
asm-generic asm-prototypes: Clear any CPP defines before declaring the functions 2017-01-12 11:39:07 +01:00
clocksource
crypto crypto: ahash - Fix EINPROGRESS notification callback 2017-04-21 09:31:23 +02:00
drm drm: Don't race connector registration 2017-06-17 06:41:53 +02:00
dt-bindings dt: bindings: net: use boolean dt properties for eee broken modes 2017-07-05 14:40:20 +02:00
keys
kvm
linux coredump: Ensure proper size of sparse core files 2017-07-05 14:40:26 +02:00
math-emu
media
memory
misc
net xfrm: fix stack access out of bounds with CONFIG_XFRM_SUB_POLICY 2017-07-05 14:40:28 +02:00
pcmcia
ras
rdma RDMA/core: Fix incorrect structure packing for booleans 2017-03-12 06:41:50 +01:00
rxrpc
scsi scsi: libiscsi: add lock around task lists to fix list corruption regression 2017-03-26 13:05:58 +02:00
soc ARM: at91: define LPDDR types 2017-03-12 06:41:41 +01:00
sound ASoC: hdmi-codec: use unsigned type to structure members with bit-field 2017-01-19 20:18:02 +01:00
target target: Avoid mappedlun symlink creation during lun shutdown 2017-04-21 09:31:21 +02:00
trace tracing: Add #undef to fix compile error 2017-03-18 19:14:29 +08:00
uapi net: ethtool: add support for 2500BaseT and 5000BaseT link modes 2017-07-05 14:40:19 +02:00
video fbdev changes for 4.9 2016-10-12 11:01:37 -07:00
xen xen: Revert commits da72ff5bfc and 72a9b18629 2017-05-14 14:00:22 +02:00
Kbuild