diff options
-rw-r--r-- | meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch | 52 | ||||
-rw-r--r-- | meta/recipes-devtools/dpkg/dpkg/dpkg-CVE-2015-0860.patch | 35 | ||||
-rw-r--r-- | meta/recipes-devtools/dpkg/dpkg_1.18.4.bb (renamed from meta/recipes-devtools/dpkg/dpkg_1.18.2.bb) | 5 |
3 files changed, 32 insertions, 60 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch b/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch index 6967ef4980..49ef853ff2 100644 --- a/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch +++ b/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From d14ffd786993da60ca84c4812da8a6594a8c764e Mon Sep 17 00:00:00 2001 | 1 | From e391bdba238d1371fc5b67cdae08b06eb5ada5c2 Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Wed, 26 Aug 2015 15:48:13 +0300 | 3 | Date: Wed, 26 Aug 2015 15:48:13 +0300 |
4 | Subject: [PATCH 1/5] When running do_package_write_deb, we have trees of | 4 | Subject: [PATCH] When running do_package_write_deb, we have trees of |
5 | hardlinked files such as the dbg source files in ${PN}-dbg. If something | 5 | hardlinked files such as the dbg source files in ${PN}-dbg. If something |
6 | makes another copy of one of those files (or deletes one), the number of | 6 | makes another copy of one of those files (or deletes one), the number of |
7 | links a file has changes and tar can notice this, e.g.: | 7 | links a file has changes and tar can notice this, e.g.: |
@@ -19,23 +19,43 @@ place to avoid that kind of issue). | |||
19 | Upstream-Status: Inappropriate | 19 | Upstream-Status: Inappropriate |
20 | RP 2015/3/27 | 20 | RP 2015/3/27 |
21 | --- | 21 | --- |
22 | dpkg-deb/build.c | 11 ++++++++--- | 22 | dpkg-deb/build.c | 12 ++++++++---- |
23 | 1 file changed, 8 insertions(+), 3 deletions(-) | 23 | 1 file changed, 8 insertions(+), 4 deletions(-) |
24 | 24 | ||
25 | diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c | 25 | diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c |
26 | index ea3d861..1589927 100644 | 26 | index 2ddeec6..af363f0 100644 |
27 | --- a/dpkg-deb/build.c | 27 | --- a/dpkg-deb/build.c |
28 | +++ b/dpkg-deb/build.c | 28 | +++ b/dpkg-deb/build.c |
29 | @@ -458,7 +458,7 @@ do_build(const char *const *argv) | 29 | @@ -452,7 +452,7 @@ static void |
30 | tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder, | ||
31 | struct compress_params *tar_compress_params, int fd_out) | ||
32 | { | ||
33 | - int pipe_filenames[2], pipe_tarball[2]; | ||
34 | + int pipe_filenames[2], pipe_tarball[2], rc; | ||
35 | pid_t pid_tar, pid_comp; | ||
36 | |||
37 | /* Fork off a tar. We will feed it a list of filenames on stdin later. */ | ||
38 | @@ -493,7 +493,9 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder, | ||
39 | /* All done, clean up wait for tar and <compress> to finish their job. */ | ||
40 | close(pipe_filenames[1]); | ||
41 | subproc_reap(pid_comp, _("<compress> from tar -cf"), 0); | ||
42 | - subproc_reap(pid_tar, "tar -cf", 0); | ||
43 | + rc = subproc_reap(pid_tar, "tar -cf", SUBPROC_RETERROR); | ||
44 | + if (rc && rc != 1) | ||
45 | + ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc); | ||
46 | } | ||
47 | |||
48 | /** | ||
49 | @@ -509,7 +511,7 @@ do_build(const char *const *argv) | ||
30 | char *debar; | 50 | char *debar; |
31 | char *tfbuf; | 51 | char *tfbuf; |
32 | int arfd; | 52 | int arfd; |
33 | - int p1[2], p2[2], gzfd; | 53 | - int p1[2], gzfd; |
34 | + int p1[2], p2[2], gzfd, rc; | 54 | + int p1[2], gzfd, rc; |
35 | pid_t c1, c2; | 55 | pid_t c1, c2; |
36 | 56 | ||
37 | /* Decode our arguments. */ | 57 | /* Decode our arguments. */ |
38 | @@ -538,7 +538,9 @@ do_build(const char *const *argv) | 58 | @@ -590,7 +592,9 @@ do_build(const char *const *argv) |
39 | } | 59 | } |
40 | close(p1[0]); | 60 | close(p1[0]); |
41 | subproc_reap(c2, _("<compress> from tar -cf"), 0); | 61 | subproc_reap(c2, _("<compress> from tar -cf"), 0); |
@@ -46,18 +66,6 @@ index ea3d861..1589927 100644 | |||
46 | 66 | ||
47 | if (lseek(gzfd, 0, SEEK_SET)) | 67 | if (lseek(gzfd, 0, SEEK_SET)) |
48 | ohshite(_("failed to rewind temporary file (%s)"), _("control member")); | 68 | ohshite(_("failed to rewind temporary file (%s)"), _("control member")); |
49 | @@ -626,7 +628,10 @@ do_build(const char *const *argv) | ||
50 | /* All done, clean up wait for tar and <compress> to finish their job. */ | ||
51 | close(p1[1]); | ||
52 | subproc_reap(c2, _("<compress> from tar -cf"), 0); | ||
53 | - subproc_reap(c1, "tar -cf", 0); | ||
54 | + rc = subproc_reap(c1, "tar -cf", SUBPROC_RETERROR); | ||
55 | + if (rc && rc != 1) | ||
56 | + ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc); | ||
57 | + | ||
58 | /* Okay, we have data.tar as well now, add it to the ar wrapper. */ | ||
59 | if (deb_format.major == 2) { | ||
60 | char datamember[16 + 1]; | ||
61 | -- | 69 | -- |
62 | 2.1.4 | 70 | 2.7.0 |
63 | 71 | ||
diff --git a/meta/recipes-devtools/dpkg/dpkg/dpkg-CVE-2015-0860.patch b/meta/recipes-devtools/dpkg/dpkg/dpkg-CVE-2015-0860.patch deleted file mode 100644 index 2fd3c3bb90..0000000000 --- a/meta/recipes-devtools/dpkg/dpkg/dpkg-CVE-2015-0860.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From 708e60ea4e16afb1d85da60dd73cb374a987653d Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Hanno=20B=C3=B6ck?= <hanno@hboeck.de> | ||
3 | Date: Thu, 19 Nov 2015 20:03:10 +0100 | ||
4 | Subject: [PATCH 1/1] dpkg-deb: Fix off-by-one write access on ctrllenbuf | ||
5 | variable | ||
6 | |||
7 | This affects old format .deb packages. | ||
8 | |||
9 | CVE: CVE-2015-0860 | ||
10 | Warned-by: afl | ||
11 | Signed-off-by: Guillem Jover <guillem@debian.org> | ||
12 | |||
13 | Upstream-Status: Backport | ||
14 | |||
15 | Signed-off-by: Catalin Enache <catalin.enache@windriver.com> | ||
16 | --- | ||
17 | dpkg-deb/extract.c | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c | ||
21 | index 5a9587a..e39fb35 100644 | ||
22 | --- a/dpkg-deb/extract.c | ||
23 | +++ b/dpkg-deb/extract.c | ||
24 | @@ -247,7 +247,7 @@ extracthalf(const char *debar, const char *dir, | ||
25 | if (errstr) | ||
26 | ohshit(_("archive has invalid format version: %s"), errstr); | ||
27 | |||
28 | - r = read_line(arfd, ctrllenbuf, 1, sizeof(ctrllenbuf)); | ||
29 | + r = read_line(arfd, ctrllenbuf, 1, sizeof(ctrllenbuf) - 1); | ||
30 | if (r < 0) | ||
31 | read_fail(r, debar, _("archive control member size")); | ||
32 | if (sscanf(ctrllenbuf, "%jd%c%d", &ctrllennum, &nlc, &dummy) != 2 || | ||
33 | -- | ||
34 | 1.9.1 | ||
35 | |||
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.18.2.bb b/meta/recipes-devtools/dpkg/dpkg_1.18.4.bb index eab896c342..7876944d6b 100644 --- a/meta/recipes-devtools/dpkg/dpkg_1.18.2.bb +++ b/meta/recipes-devtools/dpkg/dpkg_1.18.4.bb | |||
@@ -13,9 +13,8 @@ SRC_URI += "file://noman.patch \ | |||
13 | file://0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch \ | 13 | file://0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch \ |
14 | file://0005-dpkg-compiler.m4-remove-Wvla.patch \ | 14 | file://0005-dpkg-compiler.m4-remove-Wvla.patch \ |
15 | file://0006-add-musleabi-to-known-target-tripets.patch \ | 15 | file://0006-add-musleabi-to-known-target-tripets.patch \ |
16 | file://dpkg-CVE-2015-0860.patch \ | ||
17 | " | 16 | " |
18 | 17 | ||
19 | SRC_URI[md5sum] = "63b9d869081ec49adeef6c5ff62d6576" | 18 | SRC_URI[md5sum] = "e95b513c89693f6ec3ab53b6b1c3defd" |
20 | SRC_URI[sha256sum] = "11484f2a73d027d696e720a60380db71978bb5c06cd88fe30c291e069ac457a4" | 19 | SRC_URI[sha256sum] = "fe89243868888ce715bf45861f26264f767d4e4dbd0d6f1a26ce60bbbbf106da" |
21 | 20 | ||