libarchive: update to 3.3.1.

This commit is contained in:
Michael Gehring 2017-03-03 10:39:59 +00:00
parent 121558089b
commit 53e6a7bedf
3 changed files with 25 additions and 27 deletions

View File

@ -1,24 +0,0 @@
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 libarchive/archive_read_support_format_lha.c.orig libarchive/archive_read_support_format_lha.c
index 52a5531..d77a7c2 100644
--- libarchive/archive_read_support_format_lha.c.orig
+++ 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");

View File

@ -0,0 +1,22 @@
--- libarchive/archive_openssl_hmac_private.h.orig 2017-03-03 10:31:40.000000000 +0000
+++ libarchive/archive_openssl_hmac_private.h 2017-03-03 10:31:54.288574182 +0000
@@ -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)
--- libarchive/archive_openssl_evp_private.h.orig 2017-01-29 05:06:27.000000000 +0000
+++ libarchive/archive_openssl_evp_private.h 2017-03-03 10:34:47.238583104 +0000
@@ -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)

View File

@ -1,7 +1,7 @@
# Template file for 'libarchive'
pkgname=libarchive
version=3.2.2
revision=3
version=3.3.1
revision=1
bootstrap=yes
build_style=gnu-configure
configure_args="$(vopt_enable acl) $(vopt_enable acl xattr)
@ -16,7 +16,7 @@ maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://www.libarchive.org/"
license="BSD"
distfiles="http://www.libarchive.org/downloads/libarchive-${version}.tar.gz"
checksum=691c194ee132d1f0f7a42541f091db811bc2e56f7107e9121be2bc8c04f1060f
checksum=29ca5bd1624ca5a007aa57e16080262ab4379dbf8797f5c52f7ea74a3b0424e7
# Package build options
build_options="acl expat lzo lz4 ssl"