summaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorEmrah Demir <ed@abdsec.com>2016-04-08 21:16:11 +0200
committerDavid S. Miller <davem@davemloft.net>2016-04-14 05:00:50 +0200
commitb821646826e22f0491708768fccce58eef3f5704 (patch)
treef4f50c4fb686ae91dbd96284281c7e1b815b08b5 /drivers/isdn
parentnet: ipv6: Do not keep linklocal and loopback addresses (diff)
downloadlinux-b821646826e22f0491708768fccce58eef3f5704.tar.xz
linux-b821646826e22f0491708768fccce58eef3f5704.zip
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) {