]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ipv6: dccp: add missing bind_conflict to dccp_ipv6_mapped
authorEric Dumazet <edumazet@google.com>
Thu, 3 Nov 2016 15:59:46 +0000 (08:59 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Nov 2016 20:50:27 +0000 (16:50 -0400)
While fuzzing kernel with syzkaller, Andrey reported a nasty crash
in inet6_bind() caused by DCCP lacking a required method.

Fixes: 2fee3fea74b5c ("[SOCK] proto: Add hashinfo member to struct proto")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/ipv6.c

index b2a43af967e5b150449666cf96cb9a9c2c24eb05..715e5d1dc10720adbc912ec67aef11905eeb96a1 100644 (file)
@@ -958,6 +958,7 @@ static const struct inet_connection_sock_af_ops dccp_ipv6_mapped = {
        .getsockopt        = ipv6_getsockopt,
        .addr2sockaddr     = inet6_csk_addr2sockaddr,
        .sockaddr_len      = sizeof(struct sockaddr_in6),
+       .bind_conflict     = inet6_csk_bind_conflict,
 #ifdef CONFIG_COMPAT
        .compat_setsockopt = compat_ipv6_setsockopt,
        .compat_getsockopt = compat_ipv6_getsockopt,