[4.2.y-ckt stable] Patch "af_iucv: Validate socket address length in iucv_sock_bind()" has been added to the 4.2.y-ckt tree
Kamal Mostafa
kamal at canonical.com
Mon Mar 7 22:35:37 UTC 2016
This is a note to let you know that I have just added a patch titled
af_iucv: Validate socket address length in iucv_sock_bind()
to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-4.2.y-queue
This patch is scheduled to be released in version 4.2.8-ckt5.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
---8<------------------------------------------------------------
>From 075092185bc299c5b70c1ced389d8f0c9e80e6e0 Mon Sep 17 00:00:00 2001
From: Ursula Braun <ursula.braun at de.ibm.com>
Date: Tue, 19 Jan 2016 10:41:33 +0100
Subject: af_iucv: Validate socket address length in iucv_sock_bind()
[ Upstream commit 52a82e23b9f2a9e1d429c5207f8575784290d008 ]
Signed-off-by: Ursula Braun <ursula.braun at de.ibm.com>
Reported-by: Dmitry Vyukov <dvyukov at google.com>
Reviewed-by: Evgeny Cherkashin <Eugene.Crosser at ru.ibm.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
net/iucv/af_iucv.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index 918151c..3a743d8e 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -709,6 +709,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;
--
2.7.0
More information about the kernel-team
mailing list