Subject: [PATCH 10/16] ipv6: dccp: add missing bind_conflict to dccp_ipv6_mapped

From: Eric Dumazet <[email-masked]>
Date: Thu, 3 Nov 2016 08:59:46 -0700

[ Upstream commit 990ff4d84408fc55942ca6644f67e361737b3d8e ]

While fuzzing kernel with syzkaller, Andrey reported a nasty crash
in inet6_bind() caused by DCCP lacking a required method.

Fixes: ab1e0a13d7029 ("[SOCK] proto: Add hashinfo member to struct proto")
Signed-off-by: Eric Dumazet <[email-masked]>
Reported-by: Andrey Konovalov <[email-masked]>
Tested-by: Andrey Konovalov <[email-masked]>
Cc: Arnaldo Carvalho de Melo <[email-masked]>
Acked-by: Arnaldo Carvalho de Melo <[email-masked]>
Signed-off-by: David S. Miller <[email-masked]>
---
 net/dccp/ipv6.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 0773b64..27c4e81 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -948,6 +948,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,
-- 
2.7.4