[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1486322541-8206-140-git-send-email-w@1wt.eu>
Date: Sun, 5 Feb 2017 20:21:01 +0100
From: Willy Tarreau <w@....eu>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
linux@...ck-us.net
Cc: Emrah Demir <ed@...sec.com>,
"David S . Miller" <davem@...emloft.net>, Willy Tarreau <w@....eu>
Subject: [PATCH 3.10 239/319] mISDN: Fixing missing validation in base_sock_bind()
From: Emrah Demir <ed@...sec.com>
commit b821646826e22f0491708768fccce58eef3f5704 upstream.
Add validation code into mISDN/socket.c
Signed-off-by: Emrah Demir <ed@...sec.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
Signed-off-by: Willy Tarreau <w@....eu>
---
drivers/isdn/mISDN/socket.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c
index 5cefb47..00bd80a 100644
--- a/drivers/isdn/mISDN/socket.c
+++ b/drivers/isdn/mISDN/socket.c
@@ -717,6 +717,9 @@ base_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_len)
if (!maddr || maddr->family != AF_ISDN)
return -EINVAL;
+ if (addr_len < sizeof(struct sockaddr_mISDN))
+ return -EINVAL;
+
lock_sock(sk);
if (_pms(sk)->dev) {
--
2.8.0.rc2.1.gbe9624a
Powered by blists - more mailing lists