Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1374435

[PATCH] mISDN: Fixing missing validation in base_sock_bind()

From Emrah Demir <ed@abdsec.com>
Newsgroups linux.kernel
Subject [PATCH] mISDN: Fixing missing validation in base_sock_bind()
Date 2016-04-08 21:20 +0200
Message-ID <rlK6J-aw-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Emrah Demir <ed@abdsec.com>

Add validation code into mISDN/socket.c

Signed-off-by: Emrah Demir <ed@abdsec.com>
---
 drivers/isdn/mISDN/socket.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c
index 0d29b5a..99e5f97 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) {
-- 
2.8.0.rc3

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] mISDN: Fixing missing validation in base_sock_bind() Emrah Demir <ed@abdsec.com> - 2016-04-08 21:20 +0200
  Re: [PATCH] mISDN: Fixing missing validation in base_sock_bind() David Miller <davem@davemloft.net> - 2016-04-14 05:10 +0200

csiph-web