diff options
author | Emrah Demir <ed@abdsec.com> | 2016-04-08 22:16:11 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-14 06:00:50 +0300 |
commit | b821646826e22f0491708768fccce58eef3f5704 (patch) | |
tree | f4f50c4fb686ae91dbd96284281c7e1b815b08b5 /drivers/isdn | |
parent | 70af921db6f8835f4b11c65731116560adb00c14 (diff) | |
download | linux-b821646826e22f0491708768fccce58eef3f5704.tar.xz |
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.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) { |