ipv6: Check ip6_find_1stfragopt() return value properly.
authorDavid S. Miller <davem@davemloft.net>
Thu, 18 May 2017 02:54:11 +0000 (22:54 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 5 Jun 2017 20:13:57 +0000 (21:13 +0100)
commitf7c2d2d7ebf9a110cafbe53199457c318f61a192
tree76a27814e09115438fdc2cb22c4c0fa8cea7c3b4
parentad8a4d9d3f255a783d534a47d4b4ac611bb291d8
ipv6: Check ip6_find_1stfragopt() return value properly.

commit 7dd7eb9513bd02184d45f000ab69d78cb1fa1531 upstream.

Do not use unsigned variables to see if it returns a negative
error or not.

Fixes: 2423496af35d ("ipv6: Prevent overrun when parsing v6 header options")
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2: adjust filenames, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/ipv6/af_inet6.c
net/ipv6/ip6_output.c
net/ipv6/udp.c