summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-extended/libarchive/libarchive/CVE-2017-14502.patch37
-rw-r--r--meta/recipes-extended/libarchive/libarchive_3.3.2.bb1
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-extended/libarchive/libarchive/CVE-2017-14502.patch b/meta/recipes-extended/libarchive/libarchive/CVE-2017-14502.patch
new file mode 100644
index 0000000000..72e1546435
--- /dev/null
+++ b/meta/recipes-extended/libarchive/libarchive/CVE-2017-14502.patch
@@ -0,0 +1,37 @@
1From 5562545b5562f6d12a4ef991fae158bf4ccf92b6 Mon Sep 17 00:00:00 2001
2From: Joerg Sonnenberger <joerg@bec.de>
3Date: Sat, 9 Sep 2017 17:47:32 +0200
4Subject: [PATCH] Avoid a read off-by-one error for UTF16 names in RAR
5 archives.
6
7Reported-By: OSS-Fuzz issue 573
8
9CVE: CVE-2017-14502
10
11Upstream-Status: Backport
12
13Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
14---
15 libarchive/archive_read_support_format_rar.c | 6 +++++-
16 1 file changed, 5 insertions(+), 1 deletion(-)
17
18diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c
19index cbb14c3..751de69 100644
20--- a/libarchive/archive_read_support_format_rar.c
21+++ b/libarchive/archive_read_support_format_rar.c
22@@ -1496,7 +1496,11 @@ read_header(struct archive_read *a, struct archive_entry *entry,
23 return (ARCHIVE_FATAL);
24 }
25 filename[filename_size++] = '\0';
26- filename[filename_size++] = '\0';
27+ /*
28+ * Do not increment filename_size here as the computations below
29+ * add the space for the terminating NUL explicitly.
30+ */
31+ filename[filename_size] = '\0';
32
33 /* Decoded unicode form is UTF-16BE, so we have to update a string
34 * conversion object for it. */
35--
361.9.1
37
diff --git a/meta/recipes-extended/libarchive/libarchive_3.3.2.bb b/meta/recipes-extended/libarchive/libarchive_3.3.2.bb
index 9e4588fe77..edc4d6a152 100644
--- a/meta/recipes-extended/libarchive/libarchive_3.3.2.bb
+++ b/meta/recipes-extended/libarchive/libarchive_3.3.2.bb
@@ -34,6 +34,7 @@ EXTRA_OECONF += "--enable-largefile"
34SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \ 34SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \
35 file://bug929.patch \ 35 file://bug929.patch \
36 file://CVE-2017-14166.patch \ 36 file://CVE-2017-14166.patch \
37 file://CVE-2017-14502.patch \
37 " 38 "
38 39
39SRC_URI[md5sum] = "4583bd6b2ebf7e0e8963d90879eb1b27" 40SRC_URI[md5sum] = "4583bd6b2ebf7e0e8963d90879eb1b27"