Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8216468 authored by Emrah Demir's avatar Emrah Demir Committed by David S. Miller
Browse files

mISDN: Fixing missing validation in base_sock_bind()



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>
parent 70af921d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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) {