aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/libarchive/libarchive
diff options
context:
space:
mode:
authorZhixiong Chi <zhixiong.chi@windriver.com>2017-09-28 16:06:05 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-10-06 12:03:32 +0100
commit0bedb69abff85cc07ad4a54eed41d15d0a38c080 (patch)
treea95a68a5afd49f5993602b90e092cff1f86e0fdc /meta/recipes-extended/libarchive/libarchive
parente1bbca2b6d2edbea0939cbeafe6e74c1d4c59a25 (diff)
downloadopenembedded-core-contrib-0bedb69abff85cc07ad4a54eed41d15d0a38c080.tar.gz
openembedded-core-contrib-0bedb69abff85cc07ad4a54eed41d15d0a38c080.tar.bz2
openembedded-core-contrib-0bedb69abff85cc07ad4a54eed41d15d0a38c080.zip
libarchive: CVE-2017-14502
read_header in archive_read_support_format_rar.c suffers from an off-by-one error for UTF-16 names in RAR archives, leading to an out-of-bounds read in archive_read_format_rar_read_header. Backport the patch from https://github.com/libarchive/libarchive/commit commit 5562545b5562f6d12a4ef991fae158bf4ccf92b6 CVE: CVE-2017-14502 Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-extended/libarchive/libarchive')
-rw-r--r--meta/recipes-extended/libarchive/libarchive/CVE-2017-14502.patch37
1 files changed, 37 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 @@
+From 5562545b5562f6d12a4ef991fae158bf4ccf92b6 Mon Sep 17 00:00:00 2001
+From: Joerg Sonnenberger <joerg@bec.de>
+Date: Sat, 9 Sep 2017 17:47:32 +0200
+Subject: [PATCH] Avoid a read off-by-one error for UTF16 names in RAR
+ archives.
+
+Reported-By: OSS-Fuzz issue 573
+
+CVE: CVE-2017-14502
+
+Upstream-Status: Backport
+
+Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
+---
+ libarchive/archive_read_support_format_rar.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c
+index cbb14c3..751de69 100644
+--- a/libarchive/archive_read_support_format_rar.c
++++ b/libarchive/archive_read_support_format_rar.c
+@@ -1496,7 +1496,11 @@ read_header(struct archive_read *a, struct archive_entry *entry,
+ return (ARCHIVE_FATAL);
+ }
+ filename[filename_size++] = '\0';
+- filename[filename_size++] = '\0';
++ /*
++ * Do not increment filename_size here as the computations below
++ * add the space for the terminating NUL explicitly.
++ */
++ filename[filename_size] = '\0';
+
+ /* Decoded unicode form is UTF-16BE, so we have to update a string
+ * conversion object for it. */
+--
+1.9.1
+