summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArmin Kuster <akuster@mvista.com>2016-01-30 22:12:44 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-07 17:23:06 (GMT)
commit528bdf528d8bfca7746543f61609b9aceb54d53b (patch)
treeaa146bc9815c95cff99ac2c65e2ecff4bcb881be
parentdb99f58eea2dfddfd45cceb876f8ecfa7a82b3e8 (diff)
downloadpoky-528bdf528d8bfca7746543f61609b9aceb54d53b.tar.gz
dpkg: Security fix CVE-2015-0860
CVE-2015-0860 dpkg: stack overflows and out of bounds read (From OE-Core rev: 5aaec01acc9e5a19374a566307a425d43c887f4b) (From OE-Core rev: 4dea3e7b9a0041e7359981e68c561e7de8ad3ae5) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/CVE-2015-0860.patch53
-rw-r--r--meta/recipes-devtools/dpkg/dpkg_1.17.21.bb1
2 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg/CVE-2015-0860.patch b/meta/recipes-devtools/dpkg/dpkg/CVE-2015-0860.patch
new file mode 100644
index 0000000..2008d89
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/CVE-2015-0860.patch
@@ -0,0 +1,53 @@
1From f1aac7d933819569bf6f347c3c0d5a64a90bbce0 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Hanno=20B=C3=B6ck?= <hanno@hboeck.de>
3Date: Thu, 19 Nov 2015 20:03:10 +0100
4Subject: [PATCH] dpkg-deb: Fix off-by-one write access on ctrllenbuf variable
5
6This affects old format .deb packages.
7
8Fixes: CVE-2015-0860
9Warned-by: afl
10Signed-off-by: Guillem Jover <guillem@debian.org>
11
12Upstream-Status: Backport
13
14https://anonscm.debian.org/cgit/dpkg/dpkg.git/commit/?h=wheezy&id=f1aac7d933819569bf6f347c3c0d5a64a90bbce0
15
16CVE: CVE-2015-0860
17
18hand merge Changelog
19
20Signed-off-by: Armin Kuster <akuster@mvista.com>
21
22---
23 debian/changelog | 3 +++
24 dpkg-deb/extract.c | 2 +-
25 2 files changed, 4 insertions(+), 1 deletion(-)
26
27Index: dpkg-1.17.21/dpkg-deb/extract.c
28===================================================================
29--- dpkg-1.17.21.orig/dpkg-deb/extract.c
30+++ dpkg-1.17.21/dpkg-deb/extract.c
31@@ -245,7 +245,7 @@ extracthalf(const char *debar, const cha
32 if (errstr)
33 ohshit(_("archive has invalid format version: %s"), errstr);
34
35- r = read_line(arfd, ctrllenbuf, 1, sizeof(ctrllenbuf));
36+ r = read_line(arfd, ctrllenbuf, 1, sizeof(ctrllenbuf) - 1);
37 if (r < 0)
38 read_fail(r, debar, _("archive control member size"));
39 if (sscanf(ctrllenbuf, "%jd%c%d", &ctrllennum, &nlc, &dummy) != 2 ||
40Index: dpkg-1.17.21/ChangeLog
41===================================================================
42--- dpkg-1.17.21.orig/ChangeLog
43+++ dpkg-1.17.21/ChangeLog
44@@ -1,3 +1,9 @@
45+[ Guillem Jover ]
46+ * Fix an off-by-one write access in dpkg-deb when parsing the old format
47+ .deb control member size. Thanks to Hanno Böck <hanno@hboeck.de>.
48+ Fixes CVE-2015-0860.
49+
50+
51 commit 6fc9e281551e0d851e38249679688bbabbad5c5f
52 Author: Guillem Jover <guillem@debian.org>
53 Date: Sat Oct 25 02:24:41 2014 +0200
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.17.21.bb b/meta/recipes-devtools/dpkg/dpkg_1.17.21.bb
index 7adb2b2..9133d91 100644
--- a/meta/recipes-devtools/dpkg/dpkg_1.17.21.bb
+++ b/meta/recipes-devtools/dpkg/dpkg_1.17.21.bb
@@ -14,6 +14,7 @@ SRC_URI += "file://noman.patch \
14 file://no-vla-warning.patch \ 14 file://no-vla-warning.patch \
15 file://add_armeb_triplet_entry.patch \ 15 file://add_armeb_triplet_entry.patch \
16 file://tarfix.patch \ 16 file://tarfix.patch \
17 file://CVE-2015-0860.patch \
17 " 18 "
18 19
19SRC_URI[md5sum] = "765a96fd0180196613bbfa3c4aef0775" 20SRC_URI[md5sum] = "765a96fd0180196613bbfa3c4aef0775"