diff mbox series

[trusty/master-next,1/2] ipv6: dccp: add missing bind_conflict to dccp_ipv6_mapped

Message ID 20180607083436.4594-3-apw@canonical.com
State New
Headers show
Series [trusty/master-next,1/2] ipv6: dccp: add missing bind_conflict to dccp_ipv6_mapped | expand

Commit Message

Andy Whitcroft June 7, 2018, 8:34 a.m. UTC
From: Eric Dumazet <edumazet@google.com>

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 <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>

(cherry picked from commit 990ff4d84408fc55942ca6644f67e361737b3d8e)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
 net/dccp/ipv6.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series


diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 9dacede72332..752317d1df39 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -1027,6 +1027,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,
 	.compat_setsockopt = compat_ipv6_setsockopt,
 	.compat_getsockopt = compat_ipv6_getsockopt,