diff options
author | Sona Sarmadi <sona.sarmadi@enea.com> | 2017-08-29 10:31:18 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2017-08-29 13:35:58 +0200 |
commit | ad28b1279655db5b0986a8d7ca331358a3e363d1 (patch) | |
tree | 5738f9059b2f8168252f0eb77e213c1751e6fbf3 /recipes-extended | |
parent | 099300f1d986bd5a631b12601881fa7d5f990d64 (diff) | |
download | meta-nfv-access-common-ad28b1279655db5b0986a8d7ca331358a3e363d1.tar.gz |
libarchive: fix for CVE-2016-10349, CVE-2016-10350
CVE-2016-10349:
The archive_le32dec function in archive_endian.h in libarchive 3.2.2 allows
remote attackers to cause a denial of service (heap-based buffer over-read
and application crash) via a crafted file.
Fixed by: https://github.com/libarchive/libarchive/commit/88eb9e1d73fef46f04677c25b1697b8e25777ed3
CVE-2016-10350:
The archive_read_format_cab_read_header function in archive_read_support_format
_cab.c in libarchive 3.2.2 allows remote attackers to cause a denial of service
(heap-based buffer over-read and application crash) via a crafted file.
Fixed by: https://github.com/libarchive/libarchive/commit/88eb9e1d73fef46f04677c25b1697b8e25777ed3
References:
==========
https://security-tracker.debian.org/tracker/CVE-2016-10349
https://security-tracker.debian.org/tracker/CVE-2016-10350
Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r-- | recipes-extended/libarchive/libarchive/CVE-2016-10349_CVE-2016-10350.patch | 40 | ||||
-rw-r--r-- | recipes-extended/libarchive/libarchive_%.bbappend | 1 |
2 files changed, 41 insertions, 0 deletions
diff --git a/recipes-extended/libarchive/libarchive/CVE-2016-10349_CVE-2016-10350.patch b/recipes-extended/libarchive/libarchive/CVE-2016-10349_CVE-2016-10350.patch new file mode 100644 index 0000000..f2a922d --- /dev/null +++ b/recipes-extended/libarchive/libarchive/CVE-2016-10349_CVE-2016-10350.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 88eb9e1d73fef46f04677c25b1697b8e25777ed3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joerg Sonnenberger <joerg@bec.de> | ||
3 | Date: Thu, 1 Dec 2016 19:56:43 +0100 | ||
4 | Subject: [PATCH] Reread the CAB header skipping the self-extracting binary | ||
5 | code. | ||
6 | |||
7 | Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15 as found | ||
8 | by the "OSS-Fuzz" project. | ||
9 | |||
10 | CVE: CVE-2016-10349 CVE-2016-10350 | ||
11 | Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/88eb9e1d73fef46f04677c25b1697b8e25777ed3] | ||
12 | |||
13 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | ||
14 | --- | ||
15 | libarchive/archive_read_support_format_cab.c | 5 +++-- | ||
16 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/libarchive/archive_read_support_format_cab.c b/libarchive/archive_read_support_format_cab.c | ||
19 | index fc70684..099f4a8 100644 | ||
20 | --- a/libarchive/archive_read_support_format_cab.c | ||
21 | +++ b/libarchive/archive_read_support_format_cab.c | ||
22 | @@ -645,12 +645,13 @@ cab_read_header(struct archive_read *a) | ||
23 | cab = (struct cab *)(a->format->data); | ||
24 | if (cab->found_header == 0 && | ||
25 | p[0] == 'M' && p[1] == 'Z') { | ||
26 | - /* This is an executable? Must be self-extracting... */ | ||
27 | + /* This is an executable? Must be self-extracting... */ | ||
28 | err = cab_skip_sfx(a); | ||
29 | if (err < ARCHIVE_WARN) | ||
30 | return (err); | ||
31 | |||
32 | - if ((p = __archive_read_ahead(a, sizeof(*p), NULL)) == NULL) | ||
33 | + /* Re-read header after processing the SFX. */ | ||
34 | + if ((p = __archive_read_ahead(a, 42, NULL)) == NULL) | ||
35 | return (truncated_error(a)); | ||
36 | } | ||
37 | |||
38 | -- | ||
39 | 1.9.1 | ||
40 | |||
diff --git a/recipes-extended/libarchive/libarchive_%.bbappend b/recipes-extended/libarchive/libarchive_%.bbappend index b57d134..6c273a6 100644 --- a/recipes-extended/libarchive/libarchive_%.bbappend +++ b/recipes-extended/libarchive/libarchive_%.bbappend | |||
@@ -2,4 +2,5 @@ | |||
2 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | 2 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
3 | 3 | ||
4 | SRC_URI += "file://CVE-2017-5601.patch \ | 4 | SRC_URI += "file://CVE-2017-5601.patch \ |
5 | file://CVE-2016-10349_CVE-2016-10350.patch \ | ||
5 | " | 6 | " |