summaryrefslogtreecommitdiff
path: root/app-arch/libarchive/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-arch/libarchive/files
reinit the tree, so we can have metadata
Diffstat (limited to 'app-arch/libarchive/files')
-rw-r--r--app-arch/libarchive/files/CVE-2017-5601.patch24
-rw-r--r--app-arch/libarchive/files/libarchive-3.3.1-libressl.patch22
2 files changed, 46 insertions, 0 deletions
diff --git a/app-arch/libarchive/files/CVE-2017-5601.patch b/app-arch/libarchive/files/CVE-2017-5601.patch
new file mode 100644
index 000000000000..4ba85ff9072f
--- /dev/null
+++ b/app-arch/libarchive/files/CVE-2017-5601.patch
@@ -0,0 +1,24 @@
+From 98dcbbf0bf4854bf987557e55e55fff7abbf3ea9 Mon Sep 17 00:00:00 2001
+From: Martin Matuska <martin@matuska.org>
+Date: Thu, 19 Jan 2017 22:00:18 +0100
+Subject: [PATCH] Fail with negative lha->compsize in lha_read_file_header_1()
+ Fixes a heap buffer overflow reported in Secunia SA74169
+
+---
+ libarchive/archive_read_support_format_lha.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/libarchive/archive_read_support_format_lha.c b/libarchive/archive_read_support_format_lha.c
+index 52a5531..d77a7c2 100644
+--- a/libarchive/archive_read_support_format_lha.c
++++ b/libarchive/archive_read_support_format_lha.c
+@@ -924,6 +924,9 @@ lha_read_file_header_1(struct archive_read *a, struct lha *lha)
+ /* Get a real compressed file size. */
+ lha->compsize -= extdsize - 2;
+
++ if (lha->compsize < 0)
++ goto invalid; /* Invalid compressed file size */
++
+ if (sum_calculated != headersum) {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+ "LHa header sum error");
diff --git a/app-arch/libarchive/files/libarchive-3.3.1-libressl.patch b/app-arch/libarchive/files/libarchive-3.3.1-libressl.patch
new file mode 100644
index 000000000000..8078bc09210d
--- /dev/null
+++ b/app-arch/libarchive/files/libarchive-3.3.1-libressl.patch
@@ -0,0 +1,22 @@
+--- a/libarchive/archive_openssl_evp_private.h
++++ b/libarchive/archive_openssl_evp_private.h
+@@ -28,7 +28,7 @@
+ #include <openssl/evp.h>
+ #include <openssl/opensslv.h>
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ #include <stdlib.h> /* malloc, free */
+ #include <string.h> /* memset */
+ static inline EVP_MD_CTX *EVP_MD_CTX_new(void)
+--- a/libarchive/archive_openssl_hmac_private.h
++++ b/libarchive/archive_openssl_hmac_private.h
+@@ -28,7 +28,7 @@
+ #include <openssl/hmac.h>
+ #include <openssl/opensslv.h>
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ #include <stdlib.h> /* malloc, free */
+ #include <string.h> /* memset */
+ static inline HMAC_CTX *HMAC_CTX_new(void)