summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2007-07-18 02:44:12 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-08-09 14:27:27 -0700
commit9bff1948de46273efed6801db7e6b822b88b6f9a (patch)
treee94e31c50b6eeee8a04b40a4e67311d709356ce4 /net/sctp
parent420eb87364de03770d377007ea1173e0ffb1cb21 (diff)
downloadlinux-stable-9bff1948de46273efed6801db7e6b822b88b6f9a.tar.gz
linux-stable-9bff1948de46273efed6801db7e6b822b88b6f9a.tar.bz2
linux-stable-9bff1948de46273efed6801db7e6b822b88b6f9a.zip
SCTP scope_id handling fix
SCTP: Add scope_id validation for link-local binds SCTP currently permits users to bind to link-local addresses, but doesn't verify that the scope id specified at bind matches the interface that the address is configured on. It was report that this can hang a system. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/ipv6.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index 2c29394fd92e..2164b511fe51 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -875,6 +875,10 @@ static int sctp_inet6_send_verify(struct sctp_sock *opt, union sctp_addr *addr)
dev = dev_get_by_index(addr->v6.sin6_scope_id);
if (!dev)
return 0;
+ if (!ipv6_chk_addr(&addr->v6.sin6_addr, dev, 0)) {
+ dev_put(dev);
+ return 0;
+ }
dev_put(dev);
}
af = opt->pf->af;