Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1669d857a25d62c6d0a6d9216e01c21287a7c844 Commit: 1669d857a25d62c6d0a6d9216e01c21287a7c844 Parent: f50f95cab735ebe2993e8d1549f0615bad05f3f2 Author: Vlad Yasevich <[EMAIL PROTECTED]> AuthorDate: Tue Jul 3 14:29:23 2007 -0400 Committer: David S. Miller <[EMAIL PROTECTED]> CommitDate: Thu Jul 5 17:40:15 2007 -0700
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 <[EMAIL PROTECTED]> Signed-off-by: David S. Miller <[EMAIL PROTECTED]> --- net/sctp/ipv6.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 84cd536..2c29394 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c @@ -844,6 +844,10 @@ static int sctp_inet6_bind_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; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html