summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSona Sarmadi <sona.sarmadi@enea.com>2016-07-29 08:02:21 +0200
committerNora Björklund <nora.bjorklund@enea.com>2016-07-29 14:54:15 +0200
commitd7d85162fcb5ca8c1e201d89ae54b9099bf964a2 (patch)
tree072f0102f7c82f3e966f7004583b167350d17a5e
parent7c0b328610f4c12c51da935334e9ca4b37206aee (diff)
downloadmeta-enea-bsp-ppc-d7d85162fcb5ca8c1e201d89ae54b9099bf964a2.tar.gz
kernel/drivers/ppp: CVE-2015-8569
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 <sona.sarmadi@enea.com> Signed-off-by: Nora Björklund <nora.bjorklund@enea.com>
-rw-r--r--recipes-kernel/linux/files/ppp-CVE-2015-8569.patch46
-rw-r--r--recipes-kernel/linux/linux-qoriq_3.12.bbappend6
2 files changed, 52 insertions, 0 deletions
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 @@
1From d470ffbe3fe914d176ced4cf330a297c523c5711 Mon Sep 17 00:00:00 2001
2From: WANG Cong <xiyou.wangcong@gmail.com>
3Date: Mon, 14 Dec 2015 13:48:36 -0800
4Subject: pptp: verify sockaddr_len in pptp_bind() and pptp_connect()
5
6[ Upstream commit 09ccfd238e5a0e670d8178cf50180ea81ae09ae1 ]
7
8CVE: CVE-2015-8569
9Upstream-Status: Backport
10
11Reported-by: Dmitry Vyukov <dvyukov@gmail.com>
12Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
13Signed-off-by: David S. Miller <davem@davemloft.net>
14Signed-off-by: Jiri Slaby <jslaby@suse.cz>
15Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
16---
17 drivers/net/ppp/pptp.c | 6 ++++++
18 1 file changed, 6 insertions(+)
19
20diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c
21index 1dc628f..0710214 100644
22--- a/drivers/net/ppp/pptp.c
23+++ b/drivers/net/ppp/pptp.c
24@@ -420,6 +420,9 @@ static int pptp_bind(struct socket *sock, struct sockaddr *uservaddr,
25 struct pptp_opt *opt = &po->proto.pptp;
26 int error = 0;
27
28+ if (sockaddr_len < sizeof(struct sockaddr_pppox))
29+ return -EINVAL;
30+
31 lock_sock(sk);
32
33 opt->src_addr = sp->sa_addr.pptp;
34@@ -441,6 +444,9 @@ static int pptp_connect(struct socket *sock, struct sockaddr *uservaddr,
35 struct flowi4 fl4;
36 int error = 0;
37
38+ if (sockaddr_len < sizeof(struct sockaddr_pppox))
39+ return -EINVAL;
40+
41 if (sp->sa_protocol != PX_PROTO_PPTP)
42 return -EINVAL;
43
44--
45cgit v0.12
46
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 @@
1require recipes-kernel/linux/linux-qoriq-common.inc 1require recipes-kernel/linux/linux-qoriq-common.inc
2
3FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
4
5SRC_URI += "file://ppp-CVE-2015-8569.patch \
6 "
7