Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jul 2018 00:55:58 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r336800 - vendor/libarchive/dist/libarchive
Message-ID:  <201807280055.w6S0twCx016645@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Sat Jul 28 00:55:57 2018
New Revision: 336800
URL: https://svnweb.freebsd.org/changeset/base/336800

Log:
  libarchive: Cherry-pick upstream 2c8c83b9
  
  Relevant vendor changes:
    Fix issue #948: out-of-bounds read in lha_read_data_none()
  
  admbugs:	877
  Security:	CVE-2017-14503

Modified:
  vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c

Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c
==============================================================================
--- vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c	Sat Jul 28 00:33:40 2018	(r336799)
+++ vendor/libarchive/dist/libarchive/archive_read_support_format_lha.c	Sat Jul 28 00:55:57 2018	(r336800)
@@ -701,6 +701,12 @@ archive_read_format_lha_read_header(struct archive_rea
 	 * Prepare variables used to read a file content.
 	 */
 	lha->entry_bytes_remaining = lha->compsize;
+	if (lha->entry_bytes_remaining < 0) {
+		archive_set_error(&a->archive,
+		    ARCHIVE_ERRNO_FILE_FORMAT,
+		    "Invalid LHa entry size");
+		return (ARCHIVE_FATAL);
+	}
 	lha->entry_offset = 0;
 	lha->entry_crc_calculated = 0;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807280055.w6S0twCx016645>