History log of /freebsd-11-stable/contrib/libarchive/libarchive/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
370536 10-Sep-2021 mm

libarchive: import bugfix from upstream

Reworked bugfix for upstream issue #1566:
Do not follow symlinks when processing the fixup list

(cherry picked from commit c577bdfce6b4451ab897bfe5013543e78a7f9b62)

Git Hash: 85cff46114b507a378461269d345ec7292fd87dd
Git Author: mm@FreeBSD.org

370535 10-Sep-2021 git2svn

libarchive: import changes from upstream

Libarchive 3.5.2

New features:
PR #1502: Support for PWB and v7 binary cpio formats
PR #1509: Support of deflate algorithm in symbolic link decompression
for ZIP archives

Important bugfixes:
IS #1044: fix extraction of hardlinks to symlinks
PR #1480: Fix truncation of size values during 7zip archive
extraction on 32bit architectures
PR #1504: fix rar header skiming
PR #1514: ZIP excessive disk read - fix location of central directory
PR #1520: fix double-free in CAB reader
PR #1521: Fixed leak of rar before ending with error
PR #1530: Handle short writes from archive_write_callback
PR #1532: 7zip: Use compression settings from file also for file header
IS #1566: do not follow symlinks when processing the fixup list

Relnotes: yes

(cherry picked from commit ddce862ad8594542e1fa1af9ffae7264e12ffd27)

Git Hash: fd9825481d30a1a083219d610ecaaa152fceb21b
Git Author: mm@FreeBSD.org


/freebsd-11-stable/contrib/libarchive/NEWS
/freebsd-11-stable/contrib/libarchive/README.md
/freebsd-11-stable/contrib/libarchive/cat/bsdcat_platform.h
/freebsd-11-stable/contrib/libarchive/cpio/bsdcpio.1
/freebsd-11-stable/contrib/libarchive/cpio/cmdline.c
/freebsd-11-stable/contrib/libarchive/cpio/cpio.c
/freebsd-11-stable/contrib/libarchive/cpio/cpio.h
/freebsd-11-stable/contrib/libarchive/cpio/test/test_basic.c
archive.h
archive_disk_acl_freebsd.c
archive_entry.h
archive_pathmatch.c
archive_private.h
archive_random.c
archive_read_disk_posix.c
archive_read_extract2.c
archive_read_set_options.3
archive_read_support_filter_rpm.c
archive_read_support_filter_uu.c
archive_read_support_format_7zip.c
archive_read_support_format_cab.c
archive_read_support_format_cpio.c
archive_read_support_format_mtree.c
archive_read_support_format_rar.c
archive_read_support_format_rar5.c
archive_read_support_format_tar.c
archive_read_support_format_zip.c
archive_version_details.c
archive_write.c
archive_write_disk_posix.c
archive_write_format.3
archive_write_set_format.c
archive_write_set_format_7zip.c
archive_write_set_format_by_name.c
archive_write_set_format_cpio.c
archive_write_set_format_cpio_binary.c
archive_write_set_format_cpio_odc.c
archive_write_set_format_filter_by_ext.c
archive_write_set_options.3
cpio.5
libarchive-formats.5
libarchive.3
test/test_archive_pathmatch.c
test/test_compat_lzma.c
test/test_read_disk_directory_traversals.c
test/test_read_format_zip.c
test/test_read_format_zip_7z_deflate.zip.uu
test/test_short_writes.c
test/test_sparse_basic.c
test/test_write_disk_appledouble.c
test/test_write_disk_fixup.c
test/test_write_disk_hardlink.c
test/test_write_disk_hfs_compression.c
test/test_write_disk_mac_metadata.c
test/test_write_disk_no_hfs_compression.c
test/test_write_format_cpio.c
test/test_write_format_cpio_empty.c
test/test_write_format_cpio_odc.c
test/test_write_format_zip_compression_store.c
test/test_write_format_zip_empty_zip64.c
test/test_write_format_zip_file.c
test/test_write_format_zip_file_zip64.c
test/test_write_read_format_zip.c
xxhash.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_safe_writes.c
/freebsd-11-stable/contrib/libarchive/test_utils/test_main.c
/freebsd-11-stable/lib/libarchive/Makefile
/freebsd-11-stable/lib/libarchive/config_freebsd.h
/freebsd-11-stable/lib/libarchive/tests/Makefile
368986 11-Jan-2021 mm

contrib/libarchive: Import libarchive 3.5.1

(cherry picked from commit 69a18c5826c9633a6d77e18f9f34e02c83d22717)

Git Hash: a52a83deed5b769a14e4a01f6859887eb1f245c9
Git Author: mm@FreeBSD.org

368707 16-Dec-2020 mm

MFC r368207,368607:

MFC r368207:
Update libarchive to 3.5.0

Relevant vendor changes:
Issue #1258: add archive_read_support_filter_by_code()
PR #1347: mtree digest reader support
Issue #1381: skip hardlinks pointing to itself on extraction
PR #1387: fix writing of cpio archives with hardlinks without file type
PR #1388: fix rdev field in cpio format for device nodes
PR #1389: completed support for UTF-8 encoding conversion
PR #1405: more formats in archive_read_support_format_by_code()
PR #1408: fix uninitialized size in rar5_read_data
PR #1409: system extended attribute support
PR #1435: support for decompression of symbolic links in zipx archives
Issue #1456: memory leak after unsuccessful archive_write_open_filename

MFC r368607:
Sync libarchive with vendor.

Vendor changes:
Issue #1461: Unbreak build without lzma
Issue #1462: warc reader: Fix build with gcc11
Issue #1463: Fix code compatibility in test_archive_read_support.c
Issue #1464: Use built-in strnlen on platforms where not available
Issue #1465: warc reader: fix undefined behaviour in deconst() function


/freebsd-11-stable/contrib/libarchive/COPYING
/freebsd-11-stable/contrib/libarchive/NEWS
archive.h
archive_acl.c
archive_check_magic.c
archive_cryptor.c
archive_cryptor_private.h
archive_digest_private.h
archive_entry.c
archive_entry.h
archive_entry_private.h
archive_ppmd7.c
archive_read_disk_entry_from_file.c
archive_read_filter.3
archive_read_set_format.c
archive_read_support_filter_by_code.c
archive_read_support_format_by_code.c
archive_read_support_format_cab.c
archive_read_support_format_empty.c
archive_read_support_format_mtree.c
archive_read_support_format_rar.c
archive_read_support_format_rar5.c
archive_read_support_format_warc.c
archive_read_support_format_zip.c
archive_string.c
archive_string.h
archive_util.c
archive_write.c
archive_write_add_filter_xz.c
archive_write_disk_posix.c
archive_write_open.3
archive_write_open_fd.c
archive_write_open_file.c
archive_write_open_filename.c
archive_write_open_memory.c
archive_write_private.h
archive_write_set_format_7zip.c
archive_write_set_format_cpio.c
archive_write_set_format_cpio_newc.c
archive_write_set_format_iso9660.c
archive_write_set_format_mtree.c
archive_write_set_format_xar.c
archive_write_set_format_zip.c
test/test_archive_read_next_header_empty.c
test/test_archive_read_support.c
test/test_archive_string_conversion.c
test/test_entry.c
test/test_read_disk_directory_traversals.c
test/test_read_format_mtree.c
test/test_read_format_mtree.mtree.uu
test/test_read_format_raw.c
test/test_read_format_zip.c
test/test_read_format_zip_7z_lzma.zip.uu
test/test_read_set_format.c
test/test_write_disk_secure.c
test/test_write_format_cpio.c
test/test_write_format_warc.c
/freebsd-11-stable/contrib/libarchive/test_utils/test_common.h
/freebsd-11-stable/contrib/libarchive/test_utils/test_main.c
/freebsd-11-stable/lib/libarchive/Makefile
/freebsd-11-stable/lib/libarchive/config_freebsd.h
/freebsd-11-stable/lib/libarchive/tests/Makefile
/freebsd-11-stable/usr.bin/bsdcat/Makefile
/freebsd-11-stable/usr.bin/cpio/Makefile
/freebsd-11-stable/usr.bin/tar/Makefile
362133 12-Jun-2020 mm

MFC r361294:
Update libarchive to 3.4.3

Relevant vendor changes:
PR #1352: support negative zstd compression levels
PR #1359: improve zstd version checking
PR #1348: support RHT.security.selinux from GNU tar
PR #1357: support for archives compressed with pzstd
PR #1367: fix issues in acl tests
PR #1372: child handling cleanup
PR #1378: fix memory leak from passphrase callback

Relnotes: yes

358926 13-Mar-2020 mm

MFC r358533:
Sync libarchive with vendor.

Relevant vendor changes:
Issue #1257: Add testcase for ZIPX files with LZMA_STREAM_END marker
PR #1331: cpio.5: fix hard link description
Issue #1335: archive_read.c: fix UBSan warning about undefined behavior
Issue #1338: XAR reader: fix UBSan warning about undefined behavior
Issue #1339: bsdcpio_test: fix datatype in from_hex()
Issue #1341: Safe writes: delete temporary file if rename fails.
Issue #1341: Safe writes: improve error handling

358088 19-Feb-2020 mm

MFC r356212,r356366,r356416,r357785
Update libarchive to version 3.4.2

Relevant vendor changes (r356212):
Issue #351: Refactor and implement private state logic for write filters
PR #1252: RAR5 reader - verify window size for solid files (OSS-Fuzz 15482)
PR #1255: zip writer - don't append unused NUL for directories
PR #1260: Fix sparse file offset overflow on 32-bit systems
PR #1263: UNICODE filename support for reading lha/lzh format
Issue #1276: Bugfix and optimize archive_wstring_append_from_mbs()
PR #1288: Add the "xattrhdr" option to pax write options
PR #1295: 7z reader - fix reading archives with digests in PackInfo
PR #1296: RAR5 reader - verify window size for multivolume archives
PR #1297: ZIP reader - support LZMA_STREAM_END marker in 'lzma alone' files
Issue #1298: Fix a heap-buffer-overflow in archive_string_append_from_wcs()
OSS-Fuzz 19360, 19362: LHA reader - plug two memory leaks on error
Fix possible off-by-one when dealing with readlink(2)

Relevant vendor changes (r356366):
Issue #1302: Plug memory leak on failure of archive_write_client_open()

Relevant vendor changes (r356416):
Issue #1302: Re-do fix for archive_write_client_open()

Relevant vendor changes (r357785):
PR #1289: atomic extraction support (bsdtar -x --safe-writes)
PR #1308: big endian fix for UTF16 support in LHA reader
PR #1326: reject RAR5 files that declare invalid header flags
Issue #987: fix support 7z archive entries with Delta filter
Issue #1317: fix compression output buffer handling in XAR writer
Issue #1319: fix uname or gname longer than 32 characters in pax writer
Issue #1325: fix use after free when archiving hardlinks in ISO9660 or XAR
Use localtime_r() and gmtime_r() instead of localtime() and gmtime()


/freebsd-11-stable/contrib/libarchive/NEWS
/freebsd-11-stable/contrib/libarchive/cat/bsdcat.h
/freebsd-11-stable/contrib/libarchive/cat/test/test_0.c
/freebsd-11-stable/contrib/libarchive/cpio/cpio.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_basic.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_format_newc.c
archive.h
archive_acl_private.h
archive_blake2.h
archive_blake2_impl.h
archive_cmdline_private.h
archive_crc32.h
archive_cryptor.c
archive_cryptor_private.h
archive_digest.c
archive_digest_private.h
archive_endian.h
archive_entry.c
archive_entry.h
archive_entry_acl.3
archive_entry_locale.h
archive_entry_private.h
archive_getdate.c
archive_getdate.h
archive_hmac.c
archive_hmac_private.h
archive_openssl_evp_private.h
archive_openssl_hmac_private.h
archive_options_private.h
archive_pack_dev.c
archive_pack_dev.h
archive_pathmatch.h
archive_platform_acl.h
archive_platform_xattr.h
archive_ppmd7.c
archive_ppmd7_private.h
archive_ppmd8_private.h
archive_ppmd_private.h
archive_private.h
archive_random_private.h
archive_rb.h
archive_read.c
archive_read_disk_entry_from_file.c
archive_read_disk_posix.c
archive_read_disk_private.h
archive_read_private.h
archive_read_set_options.3
archive_read_support_filter_uu.c
archive_read_support_format_7zip.c
archive_read_support_format_lha.c
archive_read_support_format_mtree.c
archive_read_support_format_rar.c
archive_read_support_format_rar5.c
archive_read_support_format_warc.c
archive_read_support_format_xar.c
archive_read_support_format_zip.c
archive_string.c
archive_string.h
archive_string_composition.h
archive_util.c
archive_write.c
archive_write_add_filter_b64encode.c
archive_write_add_filter_bzip2.c
archive_write_add_filter_compress.c
archive_write_add_filter_gzip.c
archive_write_add_filter_lz4.c
archive_write_add_filter_lzop.c
archive_write_add_filter_program.c
archive_write_add_filter_uuencode.c
archive_write_add_filter_xz.c
archive_write_add_filter_zstd.c
archive_write_disk.3
archive_write_disk_posix.c
archive_write_disk_private.h
archive_write_private.h
archive_write_set_format.c
archive_write_set_format_7zip.c
archive_write_set_format_ar.c
archive_write_set_format_cpio.c
archive_write_set_format_cpio_newc.c
archive_write_set_format_gnutar.c
archive_write_set_format_iso9660.c
archive_write_set_format_pax.c
archive_write_set_format_private.h
archive_write_set_format_shar.c
archive_write_set_format_ustar.c
archive_write_set_format_v7tar.c
archive_write_set_format_warc.c
archive_write_set_format_xar.c
archive_write_set_format_zip.c
archive_write_set_options.3
archive_xxhash.h
filter_fork.h
test/test_archive_write_set_format_filter_by_ext.c
test/test_compat_zip.c
test/test_fuzz.c
test/test_open_failure.c
test/test_open_fd.c
test/test_pax_xattr_header.c
test/test_pax_xattr_header_all.tar.uu
test/test_pax_xattr_header_libarchive.tar.uu
test/test_pax_xattr_header_schily.tar.uu
test/test_read_disk_directory_traversals.c
test/test_read_extract.c
test/test_read_format_7zip.c
test/test_read_format_7zip_delta4_lzma1.7z.uu
test/test_read_format_7zip_delta4_lzma2.7z.uu
test/test_read_format_7zip_packinfo_digests.7z.uu
test/test_read_format_7zip_packinfo_digests.c
test/test_read_format_gtar_sparse.c
test/test_read_format_lha_filename_utf16.c
test/test_read_format_lha_filename_utf16.lzh.uu
test/test_read_format_rar5.c
test/test_read_format_rar5_block_size_is_too_small.rar.uu
test/test_read_format_rar5_different_solid_window_size.rar.uu
test/test_read_format_rar5_different_winsize_on_merge.rar.uu
test/test_read_format_zip.c
test/test_read_format_zip_7075_utf8_paths.c
test/test_read_format_zip_comment_stored.c
test/test_read_format_zip_extra_padding.c
test/test_read_format_zip_high_compression.c
test/test_read_format_zip_jar.c
test/test_read_format_zip_mac_metadata.c
test/test_read_format_zip_malformed.c
test/test_read_format_zip_msdos.c
test/test_read_format_zip_nested.c
test/test_read_format_zip_nofiletype.c
test/test_read_format_zip_padded.c
test/test_read_format_zip_sfx.c
test/test_read_format_zip_with_invalid_traditional_eocd.c
test/test_read_format_zip_zip64.c
test/test_read_pax_truncated.c
test/test_read_truncated_filter.c
test/test_sparse_basic.c
test/test_write_disk.c
test/test_write_format_cpio_empty.c
test/test_write_format_pax.c
test/test_write_format_shar_empty.c
test/test_write_format_tar.c
test/test_write_format_tar_sparse.c
test/test_write_format_xar.c
test/test_write_format_zip_file.c
test/test_write_format_zip_file_zip64.c
/freebsd-11-stable/contrib/libarchive/libarchive_fe/err.h
/freebsd-11-stable/contrib/libarchive/tar/bsdtar.1
/freebsd-11-stable/contrib/libarchive/tar/bsdtar.c
/freebsd-11-stable/contrib/libarchive/tar/bsdtar.h
/freebsd-11-stable/contrib/libarchive/tar/cmdline.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_basic.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_copy.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_C_upper.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_s.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_safe_writes.c
/freebsd-11-stable/contrib/libarchive/tar/util.c
/freebsd-11-stable/contrib/libarchive/test_utils/test_common.h
/freebsd-11-stable/contrib/libarchive/test_utils/test_main.c
/freebsd-11-stable/lib/libarchive/tests/Makefile
/freebsd-11-stable/usr.bin/bsdcat/Makefile
/freebsd-11-stable/usr.bin/cpio/Makefile
/freebsd-11-stable/usr.bin/tar/Makefile
/freebsd-11-stable/usr.bin/tar/tests/Makefile
353376 09-Oct-2019 mm

MFC r316456,352732:
Sync libarchive with vendor.

MFC r316456:
Vendor changes (FreeBSD-related):
Report which extended attributes could not be restored
Update archive_read_disk.3 and archive_write_disk.3 manual pages
Plug memory leaks in xattr tests.

MFC r352732:
Relevant vendor changes:
Issue #1237: Fix integer overflow in archive_read_support_filter_lz4.c
PR #1249: Correct some typographical and grammatical errors.
PR #1250: Minor corrections to the formatting of manual pages


/freebsd-11-stable/contrib/libarchive/cat/bsdcat.1
/freebsd-11-stable/contrib/libarchive/cpio/bsdcpio.1
archive.h
archive_entry.3
archive_entry_acl.3
archive_entry_misc.3
archive_entry_paths.3
archive_entry_perms.3
archive_entry_stat.3
archive_entry_time.3
archive_read.3
archive_read_add_passphrase.3
archive_read_data.3
archive_read_disk.3
archive_read_disk_entry_from_file.c
archive_read_extract.3
archive_read_filter.3
archive_read_format.3
archive_read_free.3
archive_read_header.3
archive_read_new.3
archive_read_open.3
archive_read_set_options.3
archive_read_support_filter_gzip.c
archive_read_support_filter_lz4.c
archive_read_support_format_zip.c
archive_string.c
archive_util.3
archive_write.3
archive_write_blocksize.3
archive_write_data.3
archive_write_disk.3
archive_write_disk_posix.c
archive_write_filter.3
archive_write_finish_entry.3
archive_write_format.3
archive_write_free.3
archive_write_header.3
archive_write_new.3
archive_write_open.3
archive_write_set_format_iso9660.c
archive_write_set_format_mtree.c
archive_write_set_options.3
archive_write_set_passphrase.3
libarchive_changes.3
libarchive_internals.3
tar.5
test/test_archive_write_add_filter_by_name.c
test/test_archive_write_set_format_filter_by_ext.c
test/test_read_format_raw.c
test/test_read_format_zip.c
test/test_read_format_zip_traditional_encryption_data.c
test/test_write_filter_zstd.c
test/test_xattr_platform.c
/freebsd-11-stable/contrib/libarchive/tar/bsdtar.1
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_acls.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_n.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_xattrs.c
/freebsd-11-stable/contrib/libarchive/test_utils/test_common.h
/freebsd-11-stable/contrib/libarchive/test_utils/test_main.c
349900 11-Jul-2019 mm

MFC r349527,349538:
Sync libarchive with vendor.

Relevant vendor changes:
PR #1217: RAR5 reader - fix ARM filter going beyond window buffer boundary
(OSS-Fuzz 15431)
PR #1218: Fixes to sparse file handling

349524 28-Jun-2019 mm

MFC r348993,349135:
Sync libarchive with vendor including security fixes

r348993:
- version bumped to 3.4.0
- check_symlinks_fsobj() without chdir() and fchdir()
- bsdtar.1 manpage fixes
- patches from OpenBSD to libarchive_fe/passphrase.c

r349135:
PR #1212: RAR5 reader - window_mask was not updated correctly
(OSS-Fuzz 15278)
OSS-Fuzz 15120: RAR reader - extend use after free bugfix

348607 04-Jun-2019 mm

MFC r347990:
Sync libarchive with vendor.

Relevant vendor changes:
Issue #795: XAR - do not try to add xattrs without an allocated name
PR #812: non-recursive option for extract and list
PR #958: support reading metadata from compressed files
PR #999: add --exclude-vcs option to bsdtar
Issue #1062: treat empty archives with a GNU volume header as valid
PR #1074: Handle ZIP files with trailing 0s in the extra fields
(Android APK archives)
PR #1109: Ignore padding in Zip extra field data (Android APK archives)
PR #1167: fix problems related to unreadable directories
Issue #1168: fix handling of strtol() and strtoul()
PR #1172: RAR5 - fix invalid window buffer read in E8E9 filter
PR #1174: ZIP reader - fix of MSZIP signature parsing
PR #1175: gzip filter - fix reading files larger than 4GB from memory
PR #1177: gzip filter - fix memory leak with repeated header reads
PR #1180: ZIP reader - add support for Info-ZIP Unicode Path Extra Field
PR #1181: RAR5 - fix merge_block() recursion
(OSS-Fuzz 12999, 13029, 13144, 13478, 13490)
PR #1183: fix memory leak when decompressing ZIP files with LZMA
PR #1184: fix RAR5 OSS-Fuzz issues 12466, 14490, 14491, 12817
OSS-Fuzz 12466: RAR5 - fix buffer overflow when parsing huffman tables
OSS-Fuzz 14490, 14491: RAR5 - fix bad shift-left operations
OSS-Fuzz 12817: RAR5 - handle a case with truncated huffman tables
PR #1186: RAR5 - fix invalid type used for dictionary size mask
(OSS-Fuzz 14537)
PR #1187: RAR5 - fix integer overflow (OSS-Fuzz 14555)
PR #1190: RAR5 - RAR5 don't try to unpack entries marked as directories
(OSS-Fuzz 14574)
PR #1196: RAR5 - fix a potential SIGSEGV on 32-bit builds
OSS-Fuzz 2582: RAR - fix use after free if there is an invalid entry
OSS-Fuzz 14331: RAR5 - fix maximum owner name length
OSS-Fuzz 13965: RAR5 - use unsigned int for volume number + range check

Additional RAR5 reader changes:
- support symlinks, hardlinks, file owner, file group, versioned files
- change ARCHIVE_FORMAT_RAR_V5 to 0x100000
- set correct mode for readonly directories
- support readonly, hidden and system Windows file attributes

MFC r347999:
Install missing data file for
lib.libarchive.functional_test.test_read_format_zip_utf8_paths

Approved by: re (gjb blanket)


/freebsd-11-stable/contrib/libarchive/NEWS
/freebsd-11-stable/contrib/libarchive/cpio/test/test_basic.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_format_newc.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_gcpio_compat.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_L_upper.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_a.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_c.c
archive.h
archive_entry.c
archive_entry.h
archive_entry_misc.3
archive_entry_private.h
archive_hmac.c
archive_match.c
archive_platform.h
archive_read.c
archive_read_disk_entry_from_file.c
archive_read_disk_posix.c
archive_read_private.h
archive_read_set_format.c
archive_read_support_filter_gzip.c
archive_read_support_format_cab.c
archive_read_support_format_mtree.c
archive_read_support_format_rar.c
archive_read_support_format_rar5.c
archive_read_support_format_raw.c
archive_read_support_format_tar.c
archive_read_support_format_warc.c
archive_read_support_format_xar.c
archive_read_support_format_zip.c
archive_util.c
archive_write_add_filter_xz.c
archive_write_disk_posix.c
archive_write_set_format_pax.c
archive_write_set_format_xar.c
test/test_entry.c
test/test_fuzz.c
test/test_read_disk_directory_traversals.c
test/test_read_extract.c
test/test_read_format_mtree.c
test/test_read_format_mtree_noprint.mtree.uu
test/test_read_format_rar.c
test/test_read_format_rar5.c
test/test_read_format_rar5_distance_overflow.rar.uu
test/test_read_format_rar5_extra_field_version.rar.uu
test/test_read_format_rar5_fileattr.rar.uu
test/test_read_format_rar5_hardlink.rar.uu
test/test_read_format_rar5_invalid_dict_reference.rar.uu
test/test_read_format_rar5_leftshift1.rar.uu
test/test_read_format_rar5_leftshift2.rar.uu
test/test_read_format_rar5_nonempty_dir_stream.rar.uu
test/test_read_format_rar5_owner.rar.uu
test/test_read_format_rar5_readtables_overflow.rar.uu
test/test_read_format_rar5_symlink.rar.uu
test/test_read_format_rar5_truncated_huff.rar.uu
test/test_read_format_rar5_win32.rar.uu
test/test_read_format_rar_ppmd_use_after_free.rar.uu
test/test_read_format_raw.c
test/test_read_format_raw.data.gz.uu
test/test_read_format_tar_empty_with_gnulabel.c
test/test_read_format_tar_empty_with_gnulabel.tar.uu
test/test_read_format_zip.c
test/test_read_format_zip_7075_utf8_paths.c
test/test_read_format_zip_7075_utf8_paths.zip.uu
test/test_read_format_zip_extra_padding.c
test/test_read_format_zip_extra_padding.zip.uu
test/test_read_format_zip_lzma_alone_leak.zipx.uu
test/test_sparse_basic.c
test/test_write_disk_symlink.c
/freebsd-11-stable/contrib/libarchive/tar/bsdtar.1
/freebsd-11-stable/contrib/libarchive/tar/bsdtar.c
/freebsd-11-stable/contrib/libarchive/tar/bsdtar.h
/freebsd-11-stable/contrib/libarchive/tar/cmdline.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_basic.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_copy.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_C_mtree.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_H_upper.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_L_upper.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_U_upper.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_exclude_vcs.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_n.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_s.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_strip_components.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_symlink_dir.c
/freebsd-11-stable/contrib/libarchive/test_utils/test_common.h
/freebsd-11-stable/contrib/libarchive/test_utils/test_main.c
/freebsd-11-stable/lib/libarchive/Makefile
/freebsd-11-stable/lib/libarchive/tests/Makefile
/freebsd-11-stable/usr.bin/tar/tests/Makefile
346104 10-Apr-2019 mm

MFC r345497:
Sync libarchive with vendor.

Relevant vendor changes:
PR #1153: fixed 2 bugs in ZIP reader [1]
PR #1143: ensure archive_read_disk_entry_from_file() uses ARCHIVE_READ_DISK
Changes to file flags code, support more file flags on FreeBSD:
UF_OFFLINE, UF_READONLY, UF_SPARSE, UF_REPARSE, UF_SYSTEM
UF_ARCHIVE is not supported by intention (yet)

PR: 236300 [1]

344673 28-Feb-2019 mm

MFC r344063,r344088:

MFC r344063:
Sync libarchive with vendor.

Relevant vendor changes:
PR #1085: Fix a null pointer dereference bug in zip writer
PR #1110: ZIP reader added support for XZ, LZMA, PPMD8 and BZIP2
decopmpression
PR #1116: Add support for 64-bit ar format
PR #1120: Fix a 7zip crash [1] and a ISO9660 infinite loop [2]
PR #1125: RAR5 reader - fix an invalid read and a memory leak
PR #1131: POSIX reader - do not fail when tree_current_lstat() fails
due to ENOENT [3]
PR #1134: Delete unnecessary null pointer checks before calls of free()
OSS-Fuzz 10843: Force intermediate to uint64_t to make UBSAN happy.
OSS-Fuzz 11011: Avoid buffer overflow in rar5 reader

MFC r344088:
archive_read_disk_posix.c: initialize delayed_errno

PR: 233006 [3]
Security: CVE-2019-1000019 [1], CVE-2019-1000020 [2]

342360 21-Dec-2018 mm

MFC r339746,339751,339794,340866,340939,342042:
Sync libarchive with vendor.

Relevant vendor changes:
PR #1013: Add missing h_base offset when performing absolute seeks in
xar decompression
PR #1023: Support extracting extattrs as non-root on non-user-writeable
files
PR #1061: Add support for extraction of RAR v5 archives
PR #1066: Fix out of bounds read on empty string filename for gnutar, pax
and v7tar
PR #1067: Fix temporary file path buffer overflow in tests
IS #1068: Correctly process and verify integer arguments passed to
bsdcpio and bsdtar
PR #1070: Don't default XAR entry atime/mtime to the current time
PR #1080: Spelling fixes
PR #1084: RAR5 reader bugfixes
PR #1091: fix use-after-free in delayed newc link processing
PR #1092: Fix a few obvious resource leaks and strcpy() misuses
IS #1096: Support extracting ACLs with in-entry comments (GNU tar)
PR #1102: RAR5 reader - fix big-endian problems
PR #1105: Fix various crash, memory corruption and infinite loop conditions

RAR5 reader: FreeBSD build platform fixes for powerpc(64), mips(64),
sparc64 and riscv64
RAR5 reader: more maybe-uninitialized size_t fixes for riscv64
FreeBSD build


/freebsd-11-stable/contrib/libarchive/COPYING
/freebsd-11-stable/contrib/libarchive/NEWS
/freebsd-11-stable/contrib/libarchive/README.md
/freebsd-11-stable/contrib/libarchive/cpio/cpio.c
archive.h
archive_acl.c
archive_blake2.h
archive_blake2_impl.h
archive_blake2s_ref.c
archive_blake2sp_ref.c
archive_read_support_format_all.c
archive_read_support_format_by_code.c
archive_read_support_format_rar.c
archive_read_support_format_rar5.c
archive_read_support_format_warc.c
archive_read_support_format_xar.c
archive_write_disk_posix.c
archive_write_set_format_gnutar.c
archive_write_set_format_iso9660.c
archive_write_set_format_mtree.c
archive_write_set_format_pax.c
archive_write_set_format_v7tar.c
archive_write_set_format_xar.c
test/test_extattr_freebsd.c
test/test_fuzz.c
test/test_read_format_rar5.c
test/test_read_format_rar5_arm.rar.uu
test/test_read_format_rar5_blake2.rar.uu
test/test_read_format_rar5_compressed.rar.uu
test/test_read_format_rar5_multiarchive.part01.rar.uu
test/test_read_format_rar5_multiarchive.part02.rar.uu
test/test_read_format_rar5_multiarchive.part03.rar.uu
test/test_read_format_rar5_multiarchive.part04.rar.uu
test/test_read_format_rar5_multiarchive.part05.rar.uu
test/test_read_format_rar5_multiarchive.part06.rar.uu
test/test_read_format_rar5_multiarchive.part07.rar.uu
test/test_read_format_rar5_multiarchive.part08.rar.uu
test/test_read_format_rar5_multiarchive_solid.part01.rar.uu
test/test_read_format_rar5_multiarchive_solid.part02.rar.uu
test/test_read_format_rar5_multiarchive_solid.part03.rar.uu
test/test_read_format_rar5_multiarchive_solid.part04.rar.uu
test/test_read_format_rar5_multiple_files.rar.uu
test/test_read_format_rar5_multiple_files_solid.rar.uu
test/test_read_format_rar5_solid.rar.uu
test/test_read_format_rar5_stored.rar.uu
test/test_read_format_rar5_stored_manyfiles.rar.uu
test/test_read_format_rar5_win32.rar.uu
test/test_read_format_xar.c
test/test_write_disk_perms.c
/freebsd-11-stable/contrib/libarchive/tar/bsdtar.c
/freebsd-11-stable/contrib/libarchive/tar/write.c
/freebsd-11-stable/contrib/libarchive/test_utils/test_main.c
/freebsd-11-stable/lib/libarchive/Makefile
/freebsd-11-stable/lib/libarchive/tests/Makefile
339005 28-Sep-2018 mm

MFC r338827:
Sync libarchive with vendor.

Relevant vendor changes:
PR #1019: Add allocation check for the zip_entry struct
Oss-Fuzz #10192: Handle whitespace-only ACL fields correctly

338795 19-Sep-2018 mm

MFC r338600:
Update libarchive to 3.3.3

As all important changes have already been merged from libarchive git
this is just a version number bump, documentation update and some
polishing for cpio tests. Other source code changes are not relevant to
FreeBSD.

Relnotes: yes

338033 18-Aug-2018 mm

MFH r337745:
Sync libarchive with vendor..

Vendor changes:
PR #1042: validate iso9660 directory record length

MFC after: 3 days
Security: CVE-2017-14501

337351 05-Aug-2018 mm

MFH r336801,r336854:

MFH r336801 (cem):
Cherry-pick upstream 2c8c83b9

Relevant vendor changes:
Fix issue #948: out-of-bounds read in lha_read_data_none()

MFH r336854:
Sync libarchive with vendor.

Important vendor changes:
PR #993: Chdir to -C directory for metalog processing
OSS-Fuzz #4969: Check size of the extended time field in zip archives
PR #973: Record informational compression level in gzip header

amdbugs: 877
Security: CVE-2017-14503

328827 03-Feb-2018 mm

MFH r328332:
Sync libarchive with vendor.

Relevant vendor changes:
PR #893: delete dead ppmd7 alloc callbacks
PR #904: Fix archive freeing bug in bsdcat
PR #961: Fix ZIP format names
PR #962: Don't modify attributes for existing directories
when ARCHIVE_EXTRACT_NO_OVERWRITE is set
PR #964: Fix -Werror=implicit-fallthrough= for GCC 7
PR #970: zip: Allow backslash as path separator

324417 08-Oct-2017 mm

MFH r324148:
Sync libarchive with vendor.

Relevant vendor changes:
PR #905: Support for Zstandard read and write filters
PR #922: Avoid overflow when reading corrupt cpio archive
Issue #935: heap-based buffer overflow in xml_data (CVE-2017-14166)
OSS-Fuzz 2936: Place a limit on the mtree line length
OSS-Fuzz 2394: Ensure that the ZIP AES extension header is large enough
OSS-Fuzz 573: Read off-by-one error in RAR archives (CVE-2017-14502)

Security: CVE-2017-14166, CVE-2017-14502


/freebsd-11-stable/contrib/libarchive/cat/test/test_empty.zst.uu
/freebsd-11-stable/contrib/libarchive/cat/test/test_empty_zstd.c
/freebsd-11-stable/contrib/libarchive/cat/test/test_expand.zst.uu
/freebsd-11-stable/contrib/libarchive/cat/test/test_expand_zstd.c
/freebsd-11-stable/contrib/libarchive/cpio/bsdcpio.1
/freebsd-11-stable/contrib/libarchive/cpio/cmdline.c
/freebsd-11-stable/contrib/libarchive/cpio/cpio.c
/freebsd-11-stable/contrib/libarchive/cpio/cpio.h
/freebsd-11-stable/contrib/libarchive/cpio/test/test_extract.cpio.zst.uu
/freebsd-11-stable/contrib/libarchive/cpio/test/test_extract_cpio_zstd.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_zstd.c
archive.h
archive_cmdline.c
archive_platform.h
archive_read_append_filter.c
archive_read_disk_entry_from_file.c
archive_read_filter.3
archive_read_support_filter_all.c
archive_read_support_filter_zstd.c
archive_read_support_format_cpio.c
archive_read_support_format_mtree.c
archive_read_support_format_rar.c
archive_read_support_format_tar.c
archive_read_support_format_xar.c
archive_read_support_format_zip.c
archive_string.c
archive_version_details.c
archive_write.3
archive_write_add_filter.c
archive_write_add_filter_by_name.c
archive_write_add_filter_zstd.c
archive_write_filter.3
archive_write_set_format_pax.c
test/test_archive_write_add_filter_by_name.c
test/test_compat_zstd.c
test/test_compat_zstd_1.tar.zst.uu
test/test_fuzz.c
test/test_write_filter_zstd.c
/freebsd-11-stable/contrib/libarchive/tar/bsdtar.1
/freebsd-11-stable/contrib/libarchive/tar/bsdtar.c
/freebsd-11-stable/contrib/libarchive/tar/bsdtar.h
/freebsd-11-stable/contrib/libarchive/tar/cmdline.c
/freebsd-11-stable/contrib/libarchive/tar/creation_set.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_extract.tar.zst.uu
/freebsd-11-stable/contrib/libarchive/tar/test/test_extract_tar_zstd.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_acls.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_zstd.c
/freebsd-11-stable/contrib/libarchive/test_utils/test_common.h
/freebsd-11-stable/contrib/libarchive/test_utils/test_main.c
/freebsd-11-stable/lib/libarchive/Makefile
/freebsd-11-stable/lib/libarchive/tests/Makefile
/freebsd-11-stable/usr.bin/bsdcat/tests/Makefile
/freebsd-11-stable/usr.bin/cpio/tests/Makefile
/freebsd-11-stable/usr.bin/tar/tests/Makefile
322071 04-Aug-2017 mm

MFH r321674:
Sync libarchive with vendor.

Relevant vendor changes:
PR #926: ensure ar strtab is null terminated

PR: 220462

321303 20-Jul-2017 mm

MFC r320927,320931,320932:
Bump libarchive to 3.3.2

Vendor changes:
PR #901: don't depend on stdin in a testcase

Relnotes: yes

318482 18-May-2017 mm

MFC r317782,318181:

MFC r317782 (mm):
Sync libarchive with vendor

Vendor changes (FreeBSD-related):
PR 897: add test for ZIP archives with invalid EOCD headers
PR 901: fix invalid renaming of sparse files
OSS-Fuzz issue 497: remove fallback tree in LZX decoder
OSS-Fuzz issue 527: rewrite expressions in lz4 filter
OSS-Fuzz issue 577: fix integer overflow in cpio reader
OSS-Fuzz issue 862: fix numerc parsing in mtree reader
OSS-Fuzz issue 1097: fix undefined shift in rar reader
cpio: various optimizations and memory leak fixes

MFC r318181 (ngie) (2):
cpio/tests/test_option_lz4: fix a use after free in the failure case

Reported by: Coverity (2)
Sponsored by: Dell EMC Isilon (2)


/freebsd-11-stable/contrib/libarchive/cpio/cpio.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_Z_upper.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_a.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_b64encode.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_grzip.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_lrzip.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_lz4.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_lzma.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_lzop.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_uuencode.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_xz.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_y.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_z.c
archive_entry_sparse.c
archive_getdate.c
archive_openssl_hmac_private.h
archive_read.c
archive_read_disk_entry_from_file.c
archive_read_support_filter_lz4.c
archive_read_support_format_cab.c
archive_read_support_format_cpio.c
archive_read_support_format_iso9660.c
archive_read_support_format_mtree.c
archive_read_support_format_rar.c
archive_string.c
archive_write_set_format_pax.c
libarchive_changes.3
test/test_read_format_mtree.c
test/test_read_format_zip_with_invalid_traditional_eocd.c
test/test_read_format_zip_with_invalid_traditional_eocd.zip.uu
test/test_write_format_pax.c
test/test_write_format_zip_compression_store.c
test/test_write_format_zip_large.c
xxhash.c
/freebsd-11-stable/contrib/libarchive/test_utils/test_main.c
/freebsd-11-stable/lib/libarchive/tests/Makefile
316337 31-Mar-2017 mm

MFC r315636,315876,316095:
Sync libarchive with vendor

Vendor changes/bugfixes (FreeBSD-related):
r315636:
PR 867 (bsdcpio): show numeric uid/gid when names are not found
PR 870 (seekable zip): accept files with valid ZIP64 EOCD headers
PR 880 (pax): Fix handling of "size" pax header keyword
PR 887 (crypto): Discard 3072 bytes instead of 1024 of first keystream
OSS-Fuzz issue 806 (mtree): rework mtree_atol10 integer parser
Break ACL read/write code into platform-specific source files

r315876:
Store extended attributes with extattr_set_link() if no fd is provided
Add extended attribute tests to libarchive and bsdtar
Fix tar's test_option_acls
Support the UF_HIDDEN file flag

r316095:
Constify variables in several places
Unify platform ACL code in a single source file
Fix unused variable if compiling on FreeBSD without NFSv4 ACL support


/freebsd-11-stable/contrib/libarchive/FREEBSD-Xlist
/freebsd-11-stable/contrib/libarchive/NEWS
/freebsd-11-stable/contrib/libarchive/cpio/cpio.c
archive_disk_acl_freebsd.c
archive_entry.3
archive_entry.c
archive_entry_acl.3
archive_getdate.c
archive_pack_dev.c
archive_platform.h
archive_platform_acl.h
archive_platform_xattr.h
archive_random.c
archive_read_disk_entry_from_file.c
archive_read_disk_private.h
archive_read_open.3
archive_read_support_format_cab.c
archive_read_support_format_lha.c
archive_read_support_format_mtree.c
archive_read_support_format_tar.c
archive_read_support_format_zip.c
archive_string_sprintf.c
archive_util.c
archive_version_details.c
archive_write_add_filter.c
archive_write_add_filter_by_name.c
archive_write_add_filter_lz4.c
archive_write_add_filter_program.c
archive_write_disk_acl.c
archive_write_disk_posix.c
archive_write_disk_private.h
archive_write_set_format.c
archive_write_set_format_by_name.c
archive_write_set_format_filter_by_ext.c
archive_write_set_format_warc.c
test/test_acl_platform_nfs4.c
test/test_acl_platform_posix1e.c
test/test_xattr_platform.c
/freebsd-11-stable/contrib/libarchive/tar/bsdtar.1
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_acls.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_xattrs.c
/freebsd-11-stable/contrib/libarchive/test_utils/test_common.h
/freebsd-11-stable/contrib/libarchive/test_utils/test_main.c
/freebsd-11-stable/lib/libarchive/Makefile
/freebsd-11-stable/lib/libarchive/config_freebsd.h
/freebsd-11-stable/lib/libarchive/tests/Makefile
/freebsd-11-stable/usr.bin/bsdcat/tests/Makefile
/freebsd-11-stable/usr.bin/cpio/tests/Makefile
/freebsd-11-stable/usr.bin/tar/tests/Makefile
315432 16-Mar-2017 mm

MFC r314571:
Update libarchive to version 3.3.1 (and sync with latest vendor dist)

Notable vendor changes:
PR #501: improvements in ACL path handling
PR #724: fix hang when reading malformed cpio files
PR #864: fix out of bounds read with malformed GNU tar archives
Documentation, style, test suite improvements and typo fixes.

New options to bsdtar that enable or disable reading and/or writing of:
Access Control Lists (--acls, --no-acls)
Extended file flags (--fflags, --no-fflags)
Extended attributes (--xattrs, --no-xattrs)
Mac OS X metadata (Mac OS X only) (--mac-metadata, --no-mac-metadata)


/freebsd-11-stable/contrib/libarchive/NEWS
/freebsd-11-stable/contrib/libarchive/cat/test/main.c
/freebsd-11-stable/contrib/libarchive/cat/test/test.h
/freebsd-11-stable/contrib/libarchive/cat/test/test_version.c
/freebsd-11-stable/contrib/libarchive/cpio/cpio.c
/freebsd-11-stable/contrib/libarchive/cpio/test/main.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test.h
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_version.c
archive.h
archive_check_magic.c
archive_digest_private.h
archive_entry.c
archive_entry.h
archive_entry_acl.3
archive_entry_paths.3
archive_entry_perms.3
archive_hmac.c
archive_platform.h
archive_read_disk.3
archive_read_disk_entry_from_file.c
archive_read_disk_posix.c
archive_read_disk_private.h
archive_read_format.3
archive_read_open.3
archive_read_support_format_tar.c
archive_read_support_format_warc.c
archive_write_data.3
archive_write_disk.3
archive_write_disk_acl.c
archive_write_disk_posix.c
archive_write_finish_entry.3
archive_write_format.3
archive_write_set_format_iso9660.c
test/test.h
test/test_acl_nfs4.c
test/test_acl_pax.c
test/test_acl_platform_nfs4.c
test/test_acl_platform_posix1e.c
test/test_acl_posix1e.c
test/test_acl_text.c
test/test_archive_api_feature.c
test/test_compat_solaris_tar_acl.c
test/test_compat_star_acl.c
test/test_fuzz.c
test/test_read_disk.c
test/test_read_disk_directory_traversals.c
/freebsd-11-stable/contrib/libarchive/tar/bsdtar.1
/freebsd-11-stable/contrib/libarchive/tar/bsdtar.c
/freebsd-11-stable/contrib/libarchive/tar/bsdtar.h
/freebsd-11-stable/contrib/libarchive/tar/cmdline.c
/freebsd-11-stable/contrib/libarchive/tar/read.c
/freebsd-11-stable/contrib/libarchive/tar/test/main.c
/freebsd-11-stable/contrib/libarchive/tar/test/test.h
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_acls.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_fflags.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_nodump.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_version.c
/freebsd-11-stable/contrib/libarchive/tar/util.c
/freebsd-11-stable/contrib/libarchive/tar/write.c
/freebsd-11-stable/contrib/libarchive/test_utils/test_common.h
/freebsd-11-stable/contrib/libarchive/test_utils/test_main.c
/freebsd-11-stable/lib/libarchive/config_freebsd.h
/freebsd-11-stable/lib/libarchive/tests/Makefile
/freebsd-11-stable/usr.bin/bsdcat/Makefile
/freebsd-11-stable/usr.bin/bsdcat/tests/Makefile
/freebsd-11-stable/usr.bin/cpio/Makefile
/freebsd-11-stable/usr.bin/cpio/tests/Makefile
/freebsd-11-stable/usr.bin/tar/Makefile
/freebsd-11-stable/usr.bin/tar/tests/Makefile
313926 18-Feb-2017 mm

MFC r313572,313782
Sync libarchive with vendor.

MFC r313572:
Vendor bugfixes:
cpio reader sanity fix (OSS-Fuzz 504)
WARC reader sanity fixes (OSS-Fuzz 511, 526, 532, 552)
mtree reader time parsing fix (OSS-Fuzz 538)
XAR reader memleak fix (OSS-Fuzz 551)

MFC r313782:
Vendor changes:
Make SCHILY.acl.ace header more compact (NFSv4 ACLs)

Vendor bugfixes:
zip reader integer parsing fix (OSS-Fuzz 556)
spelling fixes (issue #863)

313570 11-Feb-2017 mm

MFC r310866,310868,310870,311903,313074:
Sync libarchive with vendor.

MFC r310866:
PR #771: Add NFSv4 ACL support to pax and restricted pax

NFSv4 ACL information may now be stored to and restored from tar archives.
ACL must be non-trivial and supported by the underlying filesystem, e.g.
natively by ZFS or by UFS with the NFSv4 ACL enable flag set.

MFC r310868:
PR #843: Fix memory leak of struct archive_entry in cpio/cpio.c
PR #851: Spelling fixes
Fix two protoypes in manual page archive_read_disk.3

MFC r310870:
Use __LA_DEPRECATED macro with functions deprecated in 379867e

MFC r311903:
#691: Support for SCHILY.xattr extended attributes
#854: Spelling fixes

Multiple fixes in ACL code:
- prefer acl_set_fd_np() to acl_set_fd()
- if acl_set_fd_np() fails, do no fallback to acl_set_file()
- do not warn if trying to write ACLs to a filesystem without ACL support
- fix id handling in archive_acl_(from_to)_text*() for NFSv4 ACLs

MFC r313074:
- support extracting NFSv4 ACLs from Solaris tar archives
- bugfixes and optimizations in the ACL code
- multiple fixes in the test suite
- typo and other small bugfixes

Security fixes:
- cab reader: endless loop when parsing MSZIP signature (OSS-Fuzz 335)
- LHA reader: heap-buffer-overflow in lha_read_file_header_1()
(CVE-2017-5601)
- LZ4 reader: null-pointer dereference in lz4_filter_read_legacy_stream()
(OSS-Fuzz 453)
- mtree reader: heap-buffer-overflow in detect_form() (OSS-Fuzz 421, 443)
- WARC reader: heap-buffer-overflow in xstrpisotime() (OSS-Fuzz 382, 458)

Memory leak fixes:
- ACL support: free memory allocated by acl_get_qualifier()
- disk writer: missing free in create_filesystem_object()
- file reader: fd leak (Coverity 1016755)
- gnutar writer: fix free in archive_write_gnutar_header()
(Coverity 101675)
- iso 9660 reader: missing free in parse_file_info()
(partial Coverity 1016754)
- program reader: missing free in __archive_read_program()
- program writer: missing free in __archive_write_program_free()
- xar reader: missing free in xar_cleanup()
- xar reader: missing frees in expat_xmlattr_setup()
(Coverity 1229979-1229981)
- xar writer: missing free in file_free()
- zip reader: missing free in zip_read_local_file_header()

List of all libarchive issues at OSS-Fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/list?can=1&q=libarchive

Security: CVE-2017-5601


/freebsd-11-stable/ObsoleteFiles.inc
/freebsd-11-stable/contrib/libarchive/NEWS
/freebsd-11-stable/contrib/libarchive/cpio/cpio.c
archive_acl.c
archive_acl_private.h
archive_entry.c
archive_entry.h
archive_entry_acl.3
archive_entry_locale.h
archive_entry_strmode.c
archive_match.c
archive_platform.h
archive_random.c
archive_rb.c
archive_read_disk.3
archive_read_disk_entry_from_file.c
archive_read_disk_posix.c
archive_read_open_filename.c
archive_read_support_filter_lz4.c
archive_read_support_filter_lzop.c
archive_read_support_filter_program.c
archive_read_support_format_7zip.c
archive_read_support_format_cab.c
archive_read_support_format_cpio.c
archive_read_support_format_iso9660.c
archive_read_support_format_lha.c
archive_read_support_format_mtree.c
archive_read_support_format_rar.c
archive_read_support_format_tar.c
archive_read_support_format_warc.c
archive_read_support_format_xar.c
archive_read_support_format_zip.c
archive_string.c
archive_string.h
archive_string_composition.h
archive_write.c
archive_write_add_filter_program.c
archive_write_add_filter_xz.c
archive_write_disk_acl.c
archive_write_disk_posix.c
archive_write_open.3
archive_write_set_format_7zip.c
archive_write_set_format_gnutar.c
archive_write_set_format_iso9660.c
archive_write_set_format_pax.c
archive_write_set_format_warc.c
archive_write_set_format_xar.c
archive_write_set_format_zip.c
libarchive-formats.5
tar.5
test/main.c
test/test.h
test/test_acl_freebsd_nfs4.c
test/test_acl_freebsd_posix1e.c
test/test_acl_nfs4.c
test/test_acl_pax.c
test/test_acl_pax.tar.uu
test/test_acl_pax_nfs4.tar.uu
test/test_acl_pax_posix1e.tar.uu
test/test_acl_platform_nfs4.c
test/test_acl_platform_posix1e.c
test/test_acl_posix1e.c
test/test_acl_text.c
test/test_archive_read_add_passphrase.c
test/test_archive_string.c
test/test_compat_gtar.c
test/test_compat_solaris_tar_acl.c
test/test_compat_solaris_tar_acl.tar.uu
test/test_compat_star_acl.c
test/test_compat_star_acl_nfs4.tar.uu
test/test_compat_star_acl_posix1e.c
test/test_compat_uudecode.c
test/test_fuzz.c
test/test_read_disk_directory_traversals.c
test/test_read_filter_lzop.c
test/test_read_filter_lzop_multiple_parts.c
test/test_read_format_7zip.c
test/test_read_format_cpio_afio.c
test/test_read_format_isorr_bz2.c
test/test_read_format_zip.c
test/test_read_format_zip_comment_stored.c
test/test_read_format_zip_filename.c
test/test_read_format_zip_mac_metadata.c
test/test_read_format_zip_malformed.c
test/test_read_format_zip_nested.c
test/test_read_format_zip_padded.c
test/test_read_format_zip_sfx.c
test/test_read_format_zip_traditional_encryption_data.c
test/test_read_format_zip_winzip_aes.c
test/test_read_format_zip_winzip_aes_large.c
test/test_read_pax_schily_xattr.c
test/test_read_pax_schily_xattr.tar.uu
test/test_sparse_basic.c
test/test_write_disk_secure746.c
test/test_write_filter_lz4.c
test/test_write_filter_lzop.c
test/test_write_format_iso9660.c
test/test_write_format_iso9660_zisofs.c
test/test_write_format_zip_large.c
test/test_write_format_zip_zip64.c
xxhash.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_uid_uname.c
/freebsd-11-stable/contrib/libarchive/tar/util.c
/freebsd-11-stable/lib/libarchive/config_freebsd.h
/freebsd-11-stable/lib/libarchive/tests/Makefile
311041 02-Jan-2017 mm

MFC r309300,r309363,r309405,r309523,r309590,r310185,r310623:

Sync libarchive with vendor.

Fixed vendor issues (relevant to FreeBSD)
#825, #832: Add sanity check of tar "uid, "gid" and "mtime" fields
#830, #831, #833, #846: Spelling fixes
#850: Fix issues with reading certain jar files

Fixed issues found by Google OSS-Fuzz:
OSS-Fuzz #15: Fix heap-buffer-overflow in archive_le16dec()
OSS-Fuzz #16: Fix possible hang in uudecode_filter_read()
OSS-Fuzz #139, #145, #152: Fix heap-buffer-overflow in uudecode_bidder_bid()
OSS-Fuzz #220: Reject an 'ar' filename table larger than 1GB or a filename
larger than 1MB
OSS-Fuzz #227, #230, #239: Fix possible memory leak in archive_read_free()
OSS-Fuzz #237: Fix heap buffer overflow when reading invalid ar archives
OSS-Fuzz #286: Bugfix in archive_strncat_l()

More information:
https://github.com/libarchive/libarchive/issues/[libarchive_issue_number]
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=[oss_fuzz_issue_number]


/freebsd-11-stable/contrib/libarchive/NEWS
/freebsd-11-stable/contrib/libarchive/cat/bsdcat.c
/freebsd-11-stable/contrib/libarchive/cat/test/main.c
/freebsd-11-stable/contrib/libarchive/cpio/cpio.c
/freebsd-11-stable/contrib/libarchive/cpio/test/main.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_lz4.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_owner_parse.c
archive.h
archive_acl.c
archive_cryptor.c
archive_cryptor_private.h
archive_digest.c
archive_digest_private.h
archive_entry.c
archive_entry.h
archive_entry_acl.3
archive_hmac.c
archive_hmac_private.h
archive_openssl_evp_private.h
archive_openssl_hmac_private.h
archive_options.c
archive_read.c
archive_read_append_filter.c
archive_read_disk_entry_from_file.c
archive_read_disk_posix.c
archive_read_extract2.c
archive_read_open_memory.c
archive_read_private.h
archive_read_support_filter_uu.c
archive_read_support_filter_xz.c
archive_read_support_format_7zip.c
archive_read_support_format_ar.c
archive_read_support_format_cab.c
archive_read_support_format_cpio.c
archive_read_support_format_mtree.c
archive_read_support_format_rar.c
archive_read_support_format_tar.c
archive_read_support_format_warc.c
archive_read_support_format_xar.c
archive_read_support_format_zip.c
archive_string.c
archive_string.h
archive_write.c
archive_write_add_filter_lz4.c
archive_write_disk_posix.c
archive_write_disk_set_standard_lookup.c
archive_write_open_memory.c
archive_write_set_format_7zip.c
archive_write_set_format_ar.c
archive_write_set_format_cpio.c
archive_write_set_format_cpio_newc.c
archive_write_set_format_gnutar.c
archive_write_set_format_iso9660.c
archive_write_set_format_mtree.c
archive_write_set_format_pax.c
archive_write_set_format_shar.c
archive_write_set_format_ustar.c
archive_write_set_format_v7tar.c
archive_write_set_format_xar.c
archive_write_set_format_zip.c
test/main.c
test/test_archive_cmdline.c
test/test_archive_read_add_passphrase.c
test/test_compat_gtar.c
test/test_compat_gtar_2.tar.uu
test/test_compat_perl_archive_tar.c
test/test_compat_perl_archive_tar.tar.uu
test/test_compat_plexus_archiver_tar.c
test/test_compat_plexus_archiver_tar.tar.uu
test/test_compat_star_acl_posix1e.c
test/test_compat_star_acl_posix1e.tar.uu
test/test_pax_filename_encoding.c
test/test_read_disk_directory_traversals.c
test/test_read_format_raw.bufr.uu
test/test_read_format_raw.c
test/test_read_format_zip_jar.c
test/test_read_format_zip_jar.jar.uu
test/test_sparse_basic.c
test/test_write_disk_appledouble.c
test/test_write_format_xar_empty.c
test/test_write_format_zip_empty.c
test/test_write_format_zip_empty_zip64.c
/freebsd-11-stable/contrib/libarchive/tar/creation_set.c
/freebsd-11-stable/contrib/libarchive/tar/read.c
/freebsd-11-stable/contrib/libarchive/tar/test/main.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_copy.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_lz4.c
/freebsd-11-stable/contrib/libarchive/tar/write.c
/freebsd-11-stable/lib/libarchive/tests/Makefile
310569 26-Dec-2016 ngie

MFC r309869:

Merge changes from vendor to address several Coverity issues with
contrib/libarchive's tests

Obtained from: libarchive (ebe29c, fd0ea2, f9e3de)


/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_J_upper.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_Z_upper.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_u.c
/freebsd-11-stable/contrib/libarchive/cpio/test/test_option_y.c
test/read_open_memory.c
test/test_fuzz.c
test/test_read_disk_directory_traversals.c
test/test_read_set_format.c
/freebsd-11-stable/contrib/libarchive/tar/test/main.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_leading_slash.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_a.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_b.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_b64encode.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_gid_gname.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_grzip.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_j.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_lrzip.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_lz4.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_lzma.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_lzop.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_r.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_uid_uname.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_uuencode.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_xz.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_option_z.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_stdio.c
/freebsd-11-stable/contrib/libarchive/tar/test/test_version.c
309701 08-Dec-2016 mm

Partial MFC r309300:

Apply fix for libarchive issue #821:
"tar -P" cannot extract hardlinks through symlinks

PR: 213255
Reported by: Tijl Coosemans <tilj@FreeBSD.org>

308151 31-Oct-2016 mm

MFC r307861:
Update libarchive to 3.2.2

Most of the post-3.2.1 fixes have already been merged. This update contains
just the version bump and some fixes to the test framework.

307797 22-Oct-2016 mm

MFC r307215:
Sync libarchive with vendor. Style and tests fixes.

Important vendor bugfixes (relevant to FreeBSD):
#801: FreeBSD Coverity report: resource leak in libarchive/tar/test/main.c

307138 12-Oct-2016 mm

MFC r306670:
Sync libarchive with vendor including security fixes.

Important vendor bugfixes (relevant to FreeBSD):
#747: Out of bounds read in mtree parser
#761: heap-based buffer overflow in read_Header (7-zip)
#794: Invalid file on bsdtar command line results in internal errors (1)

PR: 213092 (1)

306321 25-Sep-2016 mm

MFC r305819:
Sync libarchive with vendor including important security fixes.

Issues fixed (FreeBSD):
PR #778: ACL error handling
Issue #745: Symlink check prefix optimization is too aggressive
Issue #746: Hard links with data can evade sandboxing restrictions

This update fixes the vulnerability #3 and vulnerability #4 as reported in
"non-cryptanalytic attacks against FreeBSD update components".
https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f

Fix for vulnerability #2 has already been merged in r305188.

Security: http://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f

305754 12-Sep-2016 mm

MFC r305422:
Sync libarchive with vendor

Vendor issues fixed:
PR #777: Multiple bugfixes for setup_acls()

This includes a bugfix for a bug that caused ACLs not to be read properly
for files and directories inside subdirectories and as a result not being
stored or being incorrectly stored in tar archives.

305188 01-Sep-2016 mm

MFC r304075,r304989:
Sync libarchive with vendor including security fixes

Vendor issues fixed:
Issue #731: Reject tar entries >= INT64_MAX
Issue #744: Very long pathnames evade symlink checks
Issue #748: libarchive can compress, but cannot decompress zip some files
PR #750: ustar: fix out of bounds read on empty string ("") filename
PR #755: fix use of acl_get_flagset_np() on FreeBSD
Issue #767: Buffer overflow printing a filename
Issue #770: Zip read: be more careful about extra_length

MFC r304874:
Temporarily disable two libarchive tests that have not yet been fixed by
vendor. Tests will be re-enabled after a fix has been merged.

302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
302294 30-Jun-2016 mm

MFV r302264:

Sync libarchive with vendor, bugfixes for tests:
- fix tests on filesystems without birthtime support, e.g. UFS1 (1)
- vendor issue #729: avoid use of C99 for-scope declarations in
test_write_format_gnutar_filenames.c

MFC after: 1 week
PR: 204157 (1)
Approved by: re (hrs)


302075 22-Jun-2016 mm

MFV r302003,r302037,r302038,r302056:

Update libarchive to 3.2.1 (bugfix and security fix release)

List of vendor fixes:
- fix exploitable heap overflow vulnerability in Rar decompression
(vendor issue 719, CVE-2016-4302, TALOS-2016-0154)
- fix exploitable stack based buffer overflow vulnebarility in mtree
parse_device functionality (vendor PR 715, CVE-2016-4301, TALOS-2016-0153)
- fix exploitable heap overflow vulnerability in 7-zip read_SubStreamsInfo
(vendor issue 718, CVE-2016-4300, TALOS-2016-152)
- fix integer overflow when computing location of volume descriptor
(vendor issue 717)
- fix buffer overflow when reading a crafred rar archive (vendor issue 521)
- fix possible buffer overflow when reading ISO9660 archives on machines
where sizeof(int) < sizeof(size_t) (vendor issue 711)
- tar and cpio should fail if an input file named on the command line is
missing (vendor issue 708)
- fix incorrect writing of gnutar filenames that are exactly 512 bytes
long (vendor issue 682)
- allow tests to be run from paths that are equal or longer than 128
characters (vendor issue 657)
- add memory allocation errors in archive_entry_xattr.c (vendor PR 603)
- remove dead code in archive_entry_xattr_add_entry() (vendor PR 716)
- fix broken decryption of ZIP files (vendor issue 553)
- manpage style, typo and description fixes

Post-3.2.1 vendor fixes:
- fix typo in cpio version reporting (Vendor PR 725, 726)
- fix argument range of ctype functions in libarchive_fe/passphrase.c
- fix ctype use and avoid empty loop bodies in WARC reader

MFC after: 1 week
Security: CVE-2016-4300, CVE-2016-4301, CVE-2016-4302
Approved by: re (kib)


299896 16-May-2016 mm

Revert r299576 and MFV r299895:

Revert r299576:
Fix broken cpio behavior.

MFV r299895:
Update to vendor git commit 860ec63.

MFC after: 3 weeks (together with libarchive 3.2.0)
Fix broken cpio behavior in pass-through mode with vendor code.
> Description of fields to fill in above: 76 columns --|
> PR: If and which Problem Report is related.
> Submitted by: If someone else sent in the change.
> Reported by: If someone else reported the issue.
> Reviewed by: If someone else reviewed your modification.
> Approved by: If you needed approval for this commit.
> Obtained from: If the change is from a third party.
> MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email.
> MFH: Ports tree branch name. Request approval for merge.
> Relnotes: Set to 'yes' for mention in release notes.
> Security: Vulnerability reference (one per line) or description.
> Sponsored by: If the change was sponsored by an organization.
> Differential Revision: https://reviews.freebsd.org/D### (*full* phabric URL needed).
> Empty fields above will be automatically removed.

_M libarchive
_M libarchive/cpio
M libarchive/cpio/bsdcpio.1
M libarchive/cpio/cpio.c
_M libarchive/libarchive
M libarchive/libarchive/archive_read_support_format_cpio.c


299540 12-May-2016 mm

MFV 299539:
Record mergeinfo in contrib/libarchive for patches accepted upstream.


299529 12-May-2016 mm

MFV r299425:

Update libarchive to 3.2.0

New features:
- new bsdcat command-line utility
- LZ4 compression (in src only via external utility from ports)
- Warc format support
- 'Raw' format writer
- Zip: Support archives >4GB, entries >4GB
- Zip: Support encrypting and decrypting entries
- Zip: Support experimental streaming extension
- Identify encrypted entries in several formats
- New --clear-nochange-flags option to bsdtar tries to remove noschg and
similar flags before deleting files
- New --ignore-zeros option to bsdtar to handle concatenated tar archives
- Use multi-threaded LZMA decompression if liblzma supports it
- Expose version info for libraries used by libarchive

Patched files (fixed compiler warnings):

contrib/libarchive/cat/bsdcat.c (vendor PR #702)
contrib/libarchive/cat/bsdcat.h (vendor PR #702)
contrib/libarchive/libarchive/archive_read_support_format_mtree.c (PR #701)
contrib/libarchive/libarchive_fe/err.c (vendor PR #703)

MFC after: 1 month
Relnotes: yes


296417 05-Mar-2016 dim

Upgrade our copies of clang, llvm, lldb and compiler-rt to 3.8.0
release.

Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
support to build; see UPDATING for more information.

Release notes for llvm and clang will soon be available here:
<http://llvm.org/releases/3.8.0/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.8.0/tools/clang/docs/ReleaseNotes.html>

Thanks to Ed Maste, Roman Divacky, Davide Italiano and Antoine Brodin
for their help.

Relnotes: yes


295914 23-Feb-2016 delphij

MFV r295913:

Partially apply upstream changeset 6e06b1c8 (kientzle).

Limit filter recursion level to 25 (instead of infinite). This fixes a
potential crash issue discovered by Alexander Cherepanov.

PR: 207362
Reported by: Robert Clausecker
Obtained from: libarchive github project


290494 07-Nov-2015 bapt

Improve collation string and locales support

Merge collation support from Illumos and DragonflyBSD.

Locales are now generated with the new localedef(1) tool from CLDR POSIX files.
The generated files are now identified as "BSD 1.0" format.

The libc now only read "BSD 1.0" locales definitions, all other version will be
set to "C"
The localedef(1) tool has been imported from Illumos and modified to use tree(3)
instead of the CDDL avl(3)
A set of tool created by edwin@ and extended by marino@ for dragonfly has been
added to be able to generate locales and the Makefiles from the vanilla CLDR
unicode databases + a universal UTF-8 charmap (by marino@)
Update the locales to unicode v27
Given our regex(3) does not support multibyte (yet) it has been forced to always
use locale C
Remove now unused colldef(1) and mklocale(1)
Finish implementing the numeric BSD extension for ctypes
The number of supported locales has grown from 175 to 250 locales. Among the new
locales: 6 Arabic locales (AE EG JO MA QA SA), Different variations of spanish
locales.
Added new 3 components locales for mn_Cyrl_MN, sr_Cyrl_RS sr_Latn_RS,
zh_Hans_CN, zh_Hant_HK and zh_Hant_TW. Some aliases has been for 2 components
version when possible.

Thanks: Garrett D'Amore (Illumos) who made sure all his work was done under
BSD license!, Edwin Groothuis (edwin@) for the work he made on tools to be able
to generate locales definition usable in freebsd sources out of vanilla CLDR
definitions, John Marino (DragonflyBSD) who first merge the Illumos work into
Dragonfly and spent hours tracking down bugs.


290102 28-Oct-2015 bapt

Merge mpsutil(8) branch

mpsutil(8)/mprutil(8) are new utilities for managing LSI Fusion-MPT
2/3 controllers (mps(4) and mpr(4))

For now only informational commands have been implemented.

This utility has been written by scottl@ [1] and polished by myself[2]

Submitted by: scottl
Discussed with: scottl
Relnotes: yes
Sponsored by: Netflix [1]
Sponsored by: Gandi.net [2]


288943 06-Oct-2015 dim

Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.7.0
release.

Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
support to build; see UPDATING for more information.

Release notes for llvm and clang can be found here:
<http://llvm.org/releases/3.7.0/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.7.0/tools/clang/docs/ReleaseNotes.html>

Thanks to Ed Maste, Andrew Turner and Antoine Brodin for their help.

Exp-run: antoine
Relnotes: yes


285972 28-Jul-2015 bdrewery

MFV r285970:

Apply upstream changeset bf4f6ec64e:

Fix issue 356: properly skip a sparse file entry in a tar file.

PR: 201506
MFC after: 3 days
Relnotes: yes


285969 28-Jul-2015 bdrewery

Mark vendor r285968 merged for r280870.


282932 14-May-2015 delphij

MFV r282927,r282928,r282930 (kientzle):

Don't segfault when reading malformed cpio archives.

MFC after: 3 days


280870 31-Mar-2015 bdrewery

Fix --one-file-system to include the directory encountered rather than
excluding it. This was broken in 3.0.4 (r238856).

Obtained from: https://github.com/libarchive/libarchive/commit/fa9e61
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division


276479 31-Dec-2014 dim

Upgrade our copy of clang, llvm and lldb to 3.5.0 release.

Please note that this version now requires C++11 support to build; see
UPDATING for more information.

Release notes for llvm and clang can be found here:
<http://llvm.org/releases/3.5.0/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.5.0/tools/clang/docs/ReleaseNotes.html>

Thanks to Ed Maste, Roman Divacky, Andrew Turner, Justin Hibbits and
Antoine Brodin for their invaluable help with this import.

Approved by: portmgr (antoine)
MFC after: 1 month


248995 02-Apr-2013 mdf

Fix return type of extattr_set_* and fix rmextattr(8) utility.

extattr_set_{fd,file,link} is logically a write(2)-like operation and
should return ssize_t, just like extattr_get_*. Also, the user-space
utility was using an int for the return value of extattr_get_* and
extattr_list_*, both of which return an ssize_t.

MFC after: 1 week


248664 23-Mar-2013 mm

Merge bugfix from vendor master branch:

Limit write requests to at most INT_MAX.
This prevents a certain common programming error (passing -1 to write)
from leading to other problems deeper in the library.

References:
https://github.com/libarchive/libarchive/commit/22531545514043e0

Reported by: Xin Li <delphij@FreeBSD.org>
Obtained from: libarchive (master branch)


248616 22-Mar-2013 mm

MFV r248590,248594:
Update libarchive to 3.1.2

Some of new features:
- support for lrzip and grzip compression
- support for writing tar v7 format
- b64encode and uuencode filters
- support for __MACOSX directory in Zip archives
- support for lzop compresion (external utility)


246229 02-Feb-2013 kientzle

Fix an obvious typo that broke time specifications of the form
"2 hours ago".


238909 30-Jul-2012 mm

Backport NFSv4 ACL fix from libarchive master branch.

Source:
https://github.com/libarchive/libarchive/commit/f67370d5

Obtained from: libarchive (master branch)


238882 29-Jul-2012 mm

Fix endless loop if reading unsupported ACL type.
Apply fix from vendor's master branch.

References:
https://github.com/libarchive/libarchive/commit/d8b9dbd

Reported on: freebsd-current@
Obtained from: libarchive


238856 28-Jul-2012 mm

Update libarchive to 3.0.4


232153 25-Feb-2012 mm

Update libarchive to 3.0.3

Some of new features:
- New readers: RAR, LHA/LZH, CAB reader, 7-Zip
- New writers: ISO9660, XAR
- Improvements to many formats, especially including ISO9660 and Zip
- Stackable write filters to write, e.g., tar.gz.uu in a single pass
- Exploit seekable input; new "seekable" Zip reader can exploit the Zip
Central Directory when it's available; the old "streamable" Zip reader
is still fully supported for cases where seeking is not possible.

Full release notes available at:
https://github.com/libarchive/libarchive/wiki/ReleaseNotes


230759 29-Jan-2012 mm

Uupdate code to vendor rev. 4183 (release/2.8)

Fixes vendor issue 224:
"Mishandling CD9660 images with RockRidge extensions from FreeBSD makefs"

References:
http://code.google.com/p/libarchive/issues/detail?id=224

MFC after: 1 week


228911 27-Dec-2011 mm

Update to vendor revision 4016.

Vendor has integrated most of our local changes in revisions 3976-3979 so
future updates are going to be easier.
Thanks to Tim Kientzle <kientzle@FreeBSD.org>.

MFC after: 8 days


228773 21-Dec-2011 mm

Merge FreeBSD changes from lib/libarchive to contrib/libarchive:

r204111 (uqs):
Fix common misspelling of hierarchy

r208027 (uqs):
mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
bottom of the manpages and order them consistently.

GNU groff doesn't care about the ordering, and doesn't even mention
CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put
them.

r208291 (uqs):
mdoc: consistently spell our email addresses <foo@FreeBSD.org>

r209031 (uqs):
mdoc nitpicking: the title argument shall be uppercase

r214822 (kientzle):
Clarify the naming: Methods that free an object should
be called "free". Retain the old "finish" names to preserve
source compatibility for now.

r214905 (kientzle):
If the Zip reader doesn't see a PK signature block
because there's inter-entry garbage, just scan forward
to find the next one. This allows us to handle a lot
of Zip archives that have been modified in-place.

Thanks to: Gleb Kurtsou for sending me a sample archive

r216258 (kientzle):
Don't write data into an empty "file."

In particular, this check avoids a warning when
extracting directory entries from certain GNU tar
archives that store directory contents.

r225525 (kientzle):
Fix cpio on ARM.

MFC after: 2 weeks


228772 21-Dec-2011 mm

Add missing integer casts to comparsions in libarchive read.

MFC after: 2 weeks


228771 21-Dec-2011 mm

Partial merge of r224691 from lib/libarchive:

Add compatibility for ISO images created with unfixed makefs that
violated ECMA-119 (ISO9660): allow reserved4 to be 0x20 in PVD.
This allows tar to read FreeBSD distribution ISO images created
with makefs prior to NetBSD bin/45217 bugfix (up to 9.0-BETA1).

MFC after: 2 weeks


228770 21-Dec-2011 mm

Remove libarchive/archive_entry_copy_bhfi.c and libarchive/mtree.5
Add these files to FREEBSD-Xlist

MFC after: 2 weeks


228769 21-Dec-2011 mm

Remove config_freebsd.h and add to FREEBSD-Xlist
This file is common for libarchive, cpio and tar and is going to be located
outside of contrib (lib/libarchive)


228764 21-Dec-2011 mm

Strip unnecessary files and directories from contrib/libarchive
according to FREEBSD-Xlist

MFC after: 2 weeks


228763 21-Dec-2011 mm

Set svn:keywords to FreeBSD=%H for contrib/libarchive

MFC after: 2 weeks


228761 21-Dec-2011 mm

Copy libarchive from vendor branch to contrib

MFC after: 2 weeks


228759 21-Dec-2011 mm

Set svn:eol-style property to native for all text files in vendor/libarchive


228753 20-Dec-2011 mm

Vendor import of libarchive (release/2.8, r3824)

Obtained from: http://libarchive.googlecode.com/svn/release/2.8