[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1450133128-18845-1-git-send-email-hannes@stressinduktion.org>
Date: Mon, 14 Dec 2015 23:45:28 +0100
From: Hannes Frederic Sowa <hannes@...essinduktion.org>
To: netdev@...r.kernel.org
Subject: [PATCH net] pptp: validate sockaddr_len before binding
Reported-by: Dmitry Vyukov <dvyukov@...il.com>
Signed-off-by: Hannes Frederic Sowa <hannes@...essinduktion.org>
---
drivers/net/ppp/pptp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c
index fc69e41d09506e..f9ffdf070ad807 100644
--- a/drivers/net/ppp/pptp.c
+++ b/drivers/net/ppp/pptp.c
@@ -419,6 +419,9 @@ static int pptp_bind(struct socket *sock, struct sockaddr *uservaddr,
struct pptp_opt *opt = &po->proto.pptp;
int error = 0;
+ if (sockaddr_len < sizeof(*sp))
+ return -EINVAL;
+
lock_sock(sk);
opt->src_addr = sp->sa_addr.pptp;
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists