Commit dea85278 authored by Emrah Demir's avatar Emrah Demir Committed by Jiri Slaby

mISDN: Fixing missing validation in base_sock_bind()

commit b8216468 upstream.

Add validation code into mISDN/socket.c
Signed-off-by: default avatarEmrah Demir <ed@abdsec.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent a770479a
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment