summaryrefslogtreecommitdiff
path: root/drivers/isdn
diff options
context:
space:
mode:
authorEmrah Demir <ed@abdsec.com>2016-04-08 22:16:11 +0300
committerDavid S. Miller <davem@davemloft.net>2016-04-13 23:00:50 -0400
commitb821646826e22f0491708768fccce58eef3f5704 (patch)
treef4f50c4fb686ae91dbd96284281c7e1b815b08b5 /drivers/isdn
parent70af921db6f8835f4b11c65731116560adb00c14 (diff)
mISDN: Fixing missing validation in base_sock_bind()
Add validation code into mISDN/socket.c Signed-off-by: Emrah Demir <ed@abdsec.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/mISDN/socket.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c
index 0d29b5a6356d..99e5f9751e8b 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) {