diff options
author | Sabrina Dubroca <sd@queasysnail.net> | 2017-05-03 16:43:19 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-05 14:37:21 +0200 |
commit | 398ac7a19f17386d17f563ebfe273ced37c4897a (patch) | |
tree | d393b6aa7d4c38a60f91190250a9298c3d882907 /include/net/llc_pdu.h | |
parent | 736b342cc9b4e804fe3ee94af1483b7203cce6cc (diff) | |
download | linux-stable-398ac7a19f17386d17f563ebfe273ced37c4897a.tar.gz linux-stable-398ac7a19f17386d17f563ebfe273ced37c4897a.tar.bz2 linux-stable-398ac7a19f17386d17f563ebfe273ced37c4897a.zip |
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
ca116922afa8 ("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: 9d6ec938019c ("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>
Diffstat (limited to 'include/net/llc_pdu.h')
0 files changed, 0 insertions, 0 deletions