xfrm: Don't use sk_family for socket policy lookups
On IPv4-mapped IPv6 addresses sk_family is AF_INET6, but the flow informations are created based on AF_INET. So the routing set up 'struct flowi4' but we try to access 'struct flowi6' what leads to an out of bounds access. Fix this by using the family we get with the dst_entry, like we do it for the standard policy lookup. Change-Id: I5b8e44f5af10f18e05fd954c74482c1596733326 Reported-by:Dmitry Vyukov <dvyukov@google.com> Tested-by:
Dmitry Vyukov <dvyukov@google.com> Signed-off-by:
Steffen Klassert <steffen.klassert@secunet.com> Git-commit: 4c86d77743a54fb2d8a4d18a037a074c892bb3be Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Tejaswi Tanikella <tejaswit@codeaurora.org>
Loading
Please register or sign in to comment