From owner-svn-src-vendor@freebsd.org Mon May 16 04:47:33 2016 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7C05B3C609; Mon, 16 May 2016 04:47:33 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A90301C25; Mon, 16 May 2016 04:47:33 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4G4lWAx029307; Mon, 16 May 2016 04:47:32 GMT (envelope-from mm@FreeBSD.org) Received: (from mm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4G4lWhP029305; Mon, 16 May 2016 04:47:32 GMT (envelope-from mm@FreeBSD.org) Message-Id: <201605160447.u4G4lWhP029305@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mm set sender to mm@FreeBSD.org using -f From: Martin Matuska Date: Mon, 16 May 2016 04:47:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r299895 - in vendor/libarchive/dist: cpio libarchive X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2016 04:47:33 -0000 Author: mm Date: Mon May 16 04:47:32 2016 New Revision: 299895 URL: https://svnweb.freebsd.org/changeset/base/299895 Log: Update vendor/libarchvie to git commit 860ec63 Integrates my pull request #709 Modified: vendor/libarchive/dist/cpio/cpio.c vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c Modified: vendor/libarchive/dist/cpio/cpio.c ============================================================================== --- vendor/libarchive/dist/cpio/cpio.c Mon May 16 04:43:47 2016 (r299894) +++ vendor/libarchive/dist/cpio/cpio.c Mon May 16 04:47:32 2016 (r299895) @@ -295,6 +295,7 @@ main(int argc, char *argv[]) "Cannot use both -p and -%c", cpio->mode); cpio->mode = opt; cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_NODOTDOT; + cpio->extract_flags &= ~ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS; break; case OPTION_PASSPHRASE: cpio->passphrase = cpio->argument; Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c Mon May 16 04:43:47 2016 (r299894) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c Mon May 16 04:47:32 2016 (r299895) @@ -401,6 +401,11 @@ archive_read_format_cpio_read_header(str /* If this is a symlink, read the link contents. */ if (archive_entry_filetype(entry) == AE_IFLNK) { + if (cpio->entry_bytes_remaining > 1024 * 1024) { + archive_set_error(&a->archive, ENOMEM, + "Rejecting malformed cpio archive: symlink contents exceed 1 megabyte"); + return (ARCHIVE_FATAL); + } h = __archive_read_ahead(a, (size_t)cpio->entry_bytes_remaining, NULL); if (h == NULL)