diff options
author | Emrah Demir <ed@abdsec.com> | 2016-04-08 22:16:11 +0300 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2016-09-29 11:14:19 +0200 |
commit | dea85278d68898838020b9f9edfa159f0a2b7eea (patch) | |
tree | 7559890e0dfd37b37d7cbe2af08e4f8657bb0579 /drivers | |
parent | a770479ab807755a935bb6424ece051de4e5db57 (diff) | |
download | lwn-dea85278d68898838020b9f9edfa159f0a2b7eea.tar.gz lwn-dea85278d68898838020b9f9edfa159f0a2b7eea.zip |
mISDN: Fixing missing validation in base_sock_bind()
commit b821646826e22f0491708768fccce58eef3f5704 upstream.
Add validation code into mISDN/socket.c
Signed-off-by: Emrah Demir <ed@abdsec.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers')
-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 5cefb479c707..00bd80a63895 100644 --- a/drivers/isdn/mISDN/socket.c +++ b/drivers/isdn/mISDN/socket.c @@ -717,6 +717,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) { |