projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed0dfff
)
af_iucv: Validate socket address length in iucv_sock_bind()
author
Ursula Braun
<ursula.braun@de.ibm.com>
Tue, 19 Jan 2016 09:41:33 +0000
(10:41 +0100)
committer
David S. Miller
<davem@davemloft.net>
Tue, 19 Jan 2016 19:21:08 +0000
(14:21 -0500)
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Reviewed-by: Evgeny Cherkashin <Eugene.Crosser@ru.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/iucv/af_iucv.c
patch
|
blob
|
blame
|
history
diff --git
a/net/iucv/af_iucv.c
b/net/iucv/af_iucv.c
index ef50a94d3eb726f75d4202a7a15c7dd1f812a3aa..fc3598a922b071503514af87deb603a154e2b33b 100644
(file)
--- a/
net/iucv/af_iucv.c
+++ b/
net/iucv/af_iucv.c
@@
-708,6
+708,9
@@
static int iucv_sock_bind(struct socket *sock, struct sockaddr *addr,
if (!addr || addr->sa_family != AF_IUCV)
return -EINVAL;
+ if (addr_len < sizeof(struct sockaddr_iucv))
+ return -EINVAL;
+
lock_sock(sk);
if (sk->sk_state != IUCV_OPEN) {
err = -EBADFD;