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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 2 Jun 2017 17:57:27 +0000 (13:57 -0400)
commit6e80ac5cc992ab6256c3dae87f7e57db15e1a58c
treeab042c99dd3349f1cf7d8af7dd585db670d6ff58
parent13fb6c2c7fe10ce39a5549c268e35341d83f2b3d
ipv6: xfrm: Handle errors reported by xfrm6_find_1stfragopt()

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>
net/ipv6/xfrm6_mode_ro.c
net/ipv6/xfrm6_mode_transport.c