projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
SCTP: Add scope_id validation for link-local binds
[firefly-linux-kernel-4.4.55.git]
/
net
/
sctp
/
ipv6.c
diff --git
a/net/sctp/ipv6.c
b/net/sctp/ipv6.c
index 84cd53635fe8f8499b8b37ba188857ec00b05f03..2c29394fd92ebf4367a24d7bb8883b657832c10f 100644
(file)
--- 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;