summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSona Sarmadi <sona.sarmadi@enea.com>2016-08-01 08:56:02 +0200
committerNora Björklund <nora.bjorklund@enea.com>2016-08-01 10:56:37 +0200
commitb065fdd08d51d4ed21fc641a2b97d42fccb5cb98 (patch)
tree3471924f2b2323de5bc00f9d261a93d496b06475
parentf06dbfa6cd73c4795e97d0e0cd616610b421b5b8 (diff)
downloadmeta-enea-bsp-arm-b065fdd08d51d4ed21fc641a2b97d42fccb5cb98.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/linux-ls1/ppp-CVE-2015-8569.patch46
-rw-r--r--recipes-kernel/linux/linux-ls1_3.12.bbappend1
2 files changed, 47 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ls1/ppp-CVE-2015-8569.patch b/recipes-kernel/linux/linux-ls1/ppp-CVE-2015-8569.patch
new file mode 100644
index 0000000..2593ce6
--- /dev/null
+++ b/recipes-kernel/linux/linux-ls1/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-ls1_3.12.bbappend b/recipes-kernel/linux/linux-ls1_3.12.bbappend
index e0c7a91..0214dda 100644
--- a/recipes-kernel/linux/linux-ls1_3.12.bbappend
+++ b/recipes-kernel/linux/linux-ls1_3.12.bbappend
@@ -5,6 +5,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
5SRC_URI += "file://ls1021aiot.dts \ 5SRC_URI += "file://ls1021aiot.dts \
6 file://0001-fsnotify-fix-oops-in-fsnotify_clear_marks_by_group_f.patch \ 6 file://0001-fsnotify-fix-oops-in-fsnotify_clear_marks_by_group_f.patch \
7 file://0002-watchdog-fix-errata-err004346.patch \ 7 file://0002-watchdog-fix-errata-err004346.patch \
8 file://ppp-CVE-2015-8569.patch \
8 " 9 "
9 10
10# fix err: "linux-ls1-3.12-r0 do_deploy: Taskhash mismatch" 11# fix err: "linux-ls1-3.12-r0 do_deploy: Taskhash mismatch"