diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-29 01:14:18 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-11-02 12:26:39 +0000 |
commit | 96cab332674aa48f69269e753aaed3af15851d6a (patch) | |
tree | 7fa2e807ee5f1bb1a2d2339cde08358b4f718ab1 /meta/recipes-extended | |
parent | 1b2a94245a8337e8a055c64e180f9e0f63f04d17 (diff) | |
download | poky-96cab332674aa48f69269e753aaed3af15851d6a.tar.gz |
unzip: CVE-2015-7696, CVE-2015-7697
CVE-2015-7696: Fixes a heap overflow triggered by unzipping a file with password
CVE-2015-7697: Fixes a denial of service with a file that never finishes unzipping
References:
http://www.openwall.com/lists/oss-security/2015/10/11/5
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-7696
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-7697
(From OE-Core rev: a11b23a7d2a29414a4ea47c411f09a68b1b28e2d)
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r-- | meta/recipes-extended/unzip/unzip/CVE-2015-7696.patch | 38 | ||||
-rw-r--r-- | meta/recipes-extended/unzip/unzip/CVE-2015-7697.patch | 31 | ||||
-rw-r--r-- | meta/recipes-extended/unzip/unzip_6.0.bb | 2 |
3 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-extended/unzip/unzip/CVE-2015-7696.patch b/meta/recipes-extended/unzip/unzip/CVE-2015-7696.patch new file mode 100644 index 0000000000..ea93823cbe --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/CVE-2015-7696.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Tudor Florea <tudor.flore@enea.com> | ||
3 | |||
4 | From 68efed87fabddd450c08f3112f62a73f61d493c9 Mon Sep 17 00:00:00 2001 | ||
5 | From: Petr Stodulka <pstodulk@redhat.com> | ||
6 | Date: Mon, 14 Sep 2015 18:23:17 +0200 | ||
7 | Subject: [PATCH 1/2] upstream fix for heap overflow | ||
8 | |||
9 | https://bugzilla.redhat.com/attachment.cgi?id=1073002 | ||
10 | --- | ||
11 | crypt.c | 12 +++++++++++- | ||
12 | 1 file changed, 11 insertions(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/crypt.c b/crypt.c | ||
15 | index 784e411..a8975f2 100644 | ||
16 | --- a/crypt.c | ||
17 | +++ b/crypt.c | ||
18 | @@ -465,7 +465,17 @@ int decrypt(__G__ passwrd) | ||
19 | GLOBAL(pInfo->encrypted) = FALSE; | ||
20 | defer_leftover_input(__G); | ||
21 | for (n = 0; n < RAND_HEAD_LEN; n++) { | ||
22 | - b = NEXTBYTE; | ||
23 | + /* 2012-11-23 SMS. (OUSPG report.) | ||
24 | + * Quit early if compressed size < HEAD_LEN. The resulting | ||
25 | + * error message ("unable to get password") could be improved, | ||
26 | + * but it's better than trying to read nonexistent data, and | ||
27 | + * then continuing with a negative G.csize. (See | ||
28 | + * fileio.c:readbyte()). | ||
29 | + */ | ||
30 | + if ((b = NEXTBYTE) == (ush)EOF) | ||
31 | + { | ||
32 | + return PK_ERR; | ||
33 | + } | ||
34 | h[n] = (uch)b; | ||
35 | Trace((stdout, " (%02x)", h[n])); | ||
36 | } | ||
37 | -- | ||
38 | 2.4.6 | ||
diff --git a/meta/recipes-extended/unzip/unzip/CVE-2015-7697.patch b/meta/recipes-extended/unzip/unzip/CVE-2015-7697.patch new file mode 100644 index 0000000000..da68988338 --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/CVE-2015-7697.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Tudor Florea <tudor.flore@enea.com> | ||
3 | |||
4 | From bd8a743ee0a77e65ad07ef4196c4cd366add3f26 Mon Sep 17 00:00:00 2001 | ||
5 | From: Kamil Dudka <kdudka@redhat.com> | ||
6 | Date: Mon, 14 Sep 2015 18:24:56 +0200 | ||
7 | Subject: [PATCH 2/2] fix infinite loop when extracting empty bzip2 data | ||
8 | |||
9 | --- | ||
10 | extract.c | 6 ++++++ | ||
11 | 1 file changed, 6 insertions(+) | ||
12 | |||
13 | diff --git a/extract.c b/extract.c | ||
14 | index 7134bfe..29db027 100644 | ||
15 | --- a/extract.c | ||
16 | +++ b/extract.c | ||
17 | @@ -2733,6 +2733,12 @@ __GDEF | ||
18 | int repeated_buf_err; | ||
19 | bz_stream bstrm; | ||
20 | |||
21 | + if (G.incnt <= 0 && G.csize <= 0L) { | ||
22 | + /* avoid an infinite loop */ | ||
23 | + Trace((stderr, "UZbunzip2() got empty input\n")); | ||
24 | + return 2; | ||
25 | + } | ||
26 | + | ||
27 | #if (defined(DLL) && !defined(NO_SLIDE_REDIR)) | ||
28 | if (G.redirect_slide) | ||
29 | wsize = G.redirect_size, redirSlide = G.redirect_buffer; | ||
30 | -- | ||
31 | 2.4.6 | ||
diff --git a/meta/recipes-extended/unzip/unzip_6.0.bb b/meta/recipes-extended/unzip/unzip_6.0.bb index 4a0a713a61..9e63d3ae76 100644 --- a/meta/recipes-extended/unzip/unzip_6.0.bb +++ b/meta/recipes-extended/unzip/unzip_6.0.bb | |||
@@ -14,6 +14,8 @@ SRC_URI = "ftp://ftp.info-zip.org/pub/infozip/src/unzip60.tgz \ | |||
14 | file://09-cve-2014-8139-crc-overflow.patch \ | 14 | file://09-cve-2014-8139-crc-overflow.patch \ |
15 | file://10-cve-2014-8140-test-compr-eb.patch \ | 15 | file://10-cve-2014-8140-test-compr-eb.patch \ |
16 | file://11-cve-2014-8141-getzip64data.patch \ | 16 | file://11-cve-2014-8141-getzip64data.patch \ |
17 | file://CVE-2015-7696.patch \ | ||
18 | file://CVE-2015-7697.patch \ | ||
17 | " | 19 | " |
18 | 20 | ||
19 | SRC_URI[md5sum] = "62b490407489521db863b523a7f86375" | 21 | SRC_URI[md5sum] = "62b490407489521db863b523a7f86375" |