diff options
author | Emrah Demir <ed@abdsec.com> | 2016-04-08 22:16:11 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-13 23:00:50 -0400 |
commit | b821646826e22f0491708768fccce58eef3f5704 (patch) | |
tree | f4f50c4fb686ae91dbd96284281c7e1b815b08b5 | |
parent | 70af921db6f8835f4b11c65731116560adb00c14 (diff) | |
download | linux-stable-b821646826e22f0491708768fccce58eef3f5704.tar.gz linux-stable-b821646826e22f0491708768fccce58eef3f5704.tar.bz2 linux-stable-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>
-rw-r--r-- | drivers/isdn/mISDN/socket.c | 3 |
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) { |