diff options
author | Steffen Klassert <steffen.klassert@secunet.com> | 2017-11-29 06:53:55 +0100 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2017-12-01 08:18:36 +0100 |
commit | ddc47e4404b58f03e98345398fb12d38fe291512 (patch) | |
tree | d21629b9b464dfe327268e156ef1a0da4e37f588 /include/trace | |
parent | xfrm: Fix xfrm_input() to verify state is valid when (encap_type < 0) (diff) | |
download | linux-ddc47e4404b58f03e98345398fb12d38fe291512.tar.xz linux-ddc47e4404b58f03e98345398fb12d38fe291512.zip |
xfrm: Fix stack-out-of-bounds read on socket policy lookup.
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>
Diffstat (limited to 'include/trace')
0 files changed, 0 insertions, 0 deletions