linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mISDN: Fixing missing validation in base_sock_bind()
@ 2016-04-08 19:16 Emrah Demir
  2016-04-14  3:01 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Emrah Demir @ 2016-04-08 19:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev, isdn, Emrah Demir

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mISDN: Fixing missing validation in base_sock_bind()
  2016-04-08 19:16 [PATCH] mISDN: Fixing missing validation in base_sock_bind() Emrah Demir
@ 2016-04-14  3:01 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-04-14  3:01 UTC (permalink / raw)
  To: ed; +Cc: linux-kernel, netdev, isdn

From: Emrah Demir <ed@abdsec.com>
Date: Fri,  8 Apr 2016 22:16:11 +0300

> From: Emrah Demir <ed@abdsec.com>
> 
> Add validation code into mISDN/socket.c
> 
> Signed-off-by: Emrah Demir <ed@abdsec.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-14  3:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-08 19:16 [PATCH] mISDN: Fixing missing validation in base_sock_bind() Emrah Demir
2016-04-14  3:01 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).