android_kernel_oneplus_msm8998/net/xfrm
Steffen Klassert 7800c76fb0 xfrm: Fix stack-out-of-bounds read on socket policy lookup.
commit ddc47e4404b58f03e98345398fb12d38fe291512 upstream.

When we do tunnel or beet mode, we pass saddr and daddr from the
template to xfrm_state_find(), this is ok. On transport mode,
we pass the addresses from the flowi, assuming that the IP
addresses (and address family) don't change during transformation.
This assumption is wrong in the IPv4 mapped IPv6 case, packet
is IPv4 and template is IPv6.

Fix this by catching address family missmatches of the policy
and the flow already before we do the lookup.

Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:03:35 +01:00
..
Kconfig
Makefile
xfrm_algo.c
xfrm_hash.c
xfrm_hash.h
xfrm_input.c xfrm: Fix crash observed during device unregistration and decryption 2016-04-20 15:42:05 +09:00
xfrm_ipcomp.c
xfrm_output.c net: preserve IP control block during GSO segmentation 2016-01-31 11:29:00 -08:00
xfrm_policy.c xfrm: Fix stack-out-of-bounds read on socket policy lookup. 2018-02-25 11:03:35 +01:00
xfrm_proc.c
xfrm_replay.c
xfrm_state.c
xfrm_sysctl.c
xfrm_user.c ipsec: Fix aborted xfrm policy dump crash 2017-12-05 11:22:49 +01:00