ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt()
authorBen Hutchings <ben@decadent.org.uk>
Wed, 31 May 2017 12:15:41 +0000 (13:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2017 11:16:19 +0000 (13:16 +0200)
commit491809d0f8d82f5c5d1b4911b1ae1f7863357784
tree0196a9ca973e3455ddae891e5b94b7d3905223c4
parentd02f4c962d35d1835d5d2e9412af83b8d63eb81d
ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt()

[ Upstream commit 6e80ac5cc992ab6256c3dae87f7e57db15e1a58c ]

xfrm6_find_1stfragopt() may now return an error code and we must
not treat it as a length.

Fixes: 2423496af35d ("ipv6: Prevent overrun when parsing v6 header options")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Craig Gallek <kraig@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/xfrm6_mode_ro.c
net/ipv6/xfrm6_mode_transport.c