Skip to content

ipv6: fix restrict IPV6_ADDRFORM operation

John Haxby lkml netdev stable 1 version Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/1ipv6: fix restrict IPV6_ADDRFORM operationnet/ipv6/ipv6_sockglue.c+6 -71 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] ipv6: fix restrict IPV6_ADDRFORM operation

Commit b6f6118901d1 ("ipv6: restrict IPV6_ADDRFORM operation") added a check to ensure that sk->sk_prot is the default pointer for a TCP IPv6 socket, an issue found by syzbot.

The earlier code simply had

    if (sk->sk_protocol != IPPROTO_TCP)
       break;

and the new code degenerated to

    if (sk->sk_protocol == IPPROTO_TCP)
       break;

the very opposite of what was intended. The following patch rearranges the checks so that the original sk->sk_prot == &tcpv6_prot is just one of the series of checks made before moving the socket.

jch

John Haxby (1):
ipv6: fix restrict IPV6_ADDRFORM operation

 net/ipv6/ipv6_sockglue.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
Signature · 1 line
2.25.3