From: Ursula Braun <ubraun@linux.vnet.ibm.com>
To: davem@davemloft.net, mschwid2@linux.vnet.ibm.com,
heicars2@linux.vnet.ibm.com, netdev@vger.kernel.org,
linux-s390@vger.kernel.org
Cc: ubraunu@linux.vnet.ibm.com
Subject: [PATCH net 1/1] af_iucv: Validate socket address length in iucv_sock_bind()
Date: Tue, 19 Jan 2016 10:41:33 +0100 [thread overview]
Message-ID: <1453196493-57590-2-git-send-email-ubraun@linux.vnet.ibm.com> (raw)
In-Reply-To: <1453196493-57590-1-git-send-email-ubraun@linux.vnet.ibm.com>
From: Ursula Braun <ursula.braun@de.ibm.com>
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>
---
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 ef50a94..fc3598a 100644
--- 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;
--
2.3.9
next prev parent reply other threads:[~2016-01-19 9:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-19 9:41 [PATCH net 0/1] af_iucv: Validate socket address length in iucv_sock_bind() Ursula Braun
2016-01-19 9:41 ` Ursula Braun [this message]
2016-01-19 19:23 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1453196493-57590-2-git-send-email-ubraun@linux.vnet.ibm.com \
--to=ubraun@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=heicars2@linux.vnet.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=mschwid2@linux.vnet.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=ubraunu@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).