Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1349967 > unrolled thread

[PATCH 3.12 003/116] af_iucv: Validate socket address length in iucv_sock_bind()

Started byJiri Slaby <jslaby@suse.cz>
First post2016-03-04 10:10 +0100
Last post2016-03-04 10:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3.12 003/116] af_iucv: Validate socket address length in iucv_sock_bind() Jiri Slaby <jslaby@suse.cz> - 2016-03-04 10:10 +0100

#1349967 — [PATCH 3.12 003/116] af_iucv: Validate socket address length in iucv_sock_bind()

FromJiri Slaby <jslaby@suse.cz>
Date2016-03-04 10:10 +0100
Subject[PATCH 3.12 003/116] af_iucv: Validate socket address length in iucv_sock_bind()
Message-ID<r8TUf-4rg-17@gated-at.bofh.it>
From: Ursula Braun <ursula.braun@de.ibm.com>

3.12-stable review patch.  If anyone has any objections, please let me know.

===============

[ Upstream commit 52a82e23b9f2a9e1d429c5207f8575784290d008 ]

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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 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 1465363a452b..bb3969a40b8e 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -697,6 +697,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.2

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web