From d7d85162fcb5ca8c1e201d89ae54b9099bf964a2 Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Fri, 29 Jul 2016 08:02:21 +0200 Subject: kernel/drivers/ppp: CVE-2015-8569 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes an out-of-bounds flaw in the kernel where the length of the sockaddr parameter was not checked in the pptp_bind() and pptp_connect() functions. A local system user could exploit this flaw to bypass kernel ASLR or leak other information. References: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8569 Upstream patch: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/patch/?id=d470ffbe3fe914d176ced4cf330a297c523c5711 Signed-off-by: Sona Sarmadi Signed-off-by: Nora Björklund --- recipes-kernel/linux/files/ppp-CVE-2015-8569.patch | 46 ++++++++++++++++++++++ recipes-kernel/linux/linux-qoriq_3.12.bbappend | 6 +++ 2 files changed, 52 insertions(+) create mode 100644 recipes-kernel/linux/files/ppp-CVE-2015-8569.patch diff --git a/recipes-kernel/linux/files/ppp-CVE-2015-8569.patch b/recipes-kernel/linux/files/ppp-CVE-2015-8569.patch new file mode 100644 index 0000000..2593ce6 --- /dev/null +++ b/recipes-kernel/linux/files/ppp-CVE-2015-8569.patch @@ -0,0 +1,46 @@ +From d470ffbe3fe914d176ced4cf330a297c523c5711 Mon Sep 17 00:00:00 2001 +From: WANG Cong +Date: Mon, 14 Dec 2015 13:48:36 -0800 +Subject: pptp: verify sockaddr_len in pptp_bind() and pptp_connect() + +[ Upstream commit 09ccfd238e5a0e670d8178cf50180ea81ae09ae1 ] + +CVE: CVE-2015-8569 +Upstream-Status: Backport + +Reported-by: Dmitry Vyukov +Signed-off-by: Cong Wang +Signed-off-by: David S. Miller +Signed-off-by: Jiri Slaby +Signed-off-by: Sona Sarmadi +--- + drivers/net/ppp/pptp.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c +index 1dc628f..0710214 100644 +--- a/drivers/net/ppp/pptp.c ++++ b/drivers/net/ppp/pptp.c +@@ -420,6 +420,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(struct sockaddr_pppox)) ++ return -EINVAL; ++ + lock_sock(sk); + + opt->src_addr = sp->sa_addr.pptp; +@@ -441,6 +444,9 @@ static int pptp_connect(struct socket *sock, struct sockaddr *uservaddr, + struct flowi4 fl4; + int error = 0; + ++ if (sockaddr_len < sizeof(struct sockaddr_pppox)) ++ return -EINVAL; ++ + if (sp->sa_protocol != PX_PROTO_PPTP) + return -EINVAL; + +-- +cgit v0.12 + diff --git a/recipes-kernel/linux/linux-qoriq_3.12.bbappend b/recipes-kernel/linux/linux-qoriq_3.12.bbappend index f9311e9..09a3d77 100644 --- a/recipes-kernel/linux/linux-qoriq_3.12.bbappend +++ b/recipes-kernel/linux/linux-qoriq_3.12.bbappend @@ -1 +1,7 @@ require recipes-kernel/linux/linux-qoriq-common.inc + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += "file://ppp-CVE-2015-8569.patch \ + " + -- cgit v1.2.3-54-g00ecf