Skip to content

Commit

Permalink
mISDN: Fixing missing validation in base_sock_bind()
Browse files Browse the repository at this point in the history
Add validation code into mISDN/socket.c

Signed-off-by: Emrah Demir <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
rexadanse authored and davem330 committed Apr 14, 2016
1 parent 70af921 commit b821646
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/isdn/mISDN/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b821646

Please sign in to comment.