[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1460142971-16459-1-git-send-email-ed@abdsec.com>
Date: Fri, 8 Apr 2016 22:16:11 +0300
From: Emrah Demir <ed@...sec.com>
To: linux-kernel@...r.kernel.org
Cc: netdev@...r.kernel.org, isdn@...ux-pingi.de,
Emrah Demir <ed@...sec.com>
Subject: [PATCH] mISDN: Fixing missing validation in base_sock_bind()
From: Emrah Demir <ed@...sec.com>
Add validation code into mISDN/socket.c
Signed-off-by: Emrah Demir <ed@...sec.com>
---
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 0d29b5a..99e5f97 100644
--- a/drivers/isdn/mISDN/socket.c
+++ b/drivers/isdn/mISDN/socket.c
@@ -715,6 +715,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.rc3
Powered by blists - more mailing lists