Bug 233006 - [regression] [patch] bsdtar aborts creation of archive on ENOENT
Summary: [regression] [patch] bsdtar aborts creation of archive on ENOENT
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.2-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Martin Matuska
URL: https://github.com/libarchive/libarch...
Keywords: patch, regression
Depends on:
Blocks:
 
Reported: 2018-11-05 21:36 UTC by Eugene Grosbein
Modified: 2019-03-01 04:37 UTC (History)
5 users (show)

See Also:
mm: mfc-stable12+
mm: mfc-stable11+


Attachments
draft patch (1.54 KB, patch)
2018-11-06 05:10 UTC, Eugene Grosbein
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Grosbein freebsd_committer freebsd_triage 2018-11-05 21:36:43 UTC
I use nightly periodic job to make an archive by means of tar(1) for a directory with large set of subdirectories (over 2500) containing two sets of files: always present RRD databases and frequently created/removed temporary files. The process of their creation/removal never stops and presence/absence of temporary files it not important for resulting archieve.

Recently I've found that bsdtar (used as tar for 11.2) aborts archive creation if it finds that a file disappeared in-process. Plus, it emits strang messages in this case:

tar: db/parxomenko/71a/.newdata: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors.
: tar format cannot archive socket: tar format cannot archive socket: tar format cannot archive socket: tar format cannot archive socket

There are no sockets nor file system object types other than regular files or directories in this tree.

The problem lies in the contrib/libarchive/libarchive/archive_read_disk_posix.c file, function next_entry() that returns ARCHIVE_FAILED in case of failure of tree_current_lstat() even for ENOENT case. It should tolerate ENOENT and continue with execution as it the file in question was not seen at all or found empty.

GNU tar responds with "File removed before we read it" message and continues.
Comment 1 Martin Matuska freebsd_committer freebsd_triage 2018-11-05 22:31:13 UTC
Could you please file the bug at https://github.com/libarchive/libarchive?
Comment 2 Eugene Grosbein freebsd_committer freebsd_triage 2018-11-05 22:35:11 UTC
(In reply to Martin Matuska from comment #1)

I have no github account (nor I need it).
Comment 3 Martin Matuska freebsd_committer freebsd_triage 2018-11-05 22:39:54 UTC
Created upstream issue https://github.com/libarchive/libarchive/issues/1082
Comment 4 Eugene Grosbein freebsd_committer freebsd_triage 2018-11-06 02:00:50 UTC
Also note that it is not possible to work around the problem with --exclude '*.tmp' as path matching is performed later and lstat() error aborts the process before matching.
Comment 5 Eugene Grosbein freebsd_committer freebsd_triage 2018-11-06 02:02:46 UTC
OTOH, "tar format cannot archive socket" messages seem to come from another tar invocation within same periodic job (for another tree having sockets) and have no connection to this problem.
Comment 6 Eugene Grosbein freebsd_committer freebsd_triage 2018-11-06 05:10:35 UTC
Created attachment 199000 [details]
draft patch

This patch for libarchive fixes the problem for me: if tree_current_lstat() fails due to ENOENT, it returns ARCHIVE_WARN instead of ARCHIVE_FAILED, so tar(1) continues with execution instead of stopping. Also, it returns descriptive notification about files it could not put to the archive.
Comment 7 Jan Martin Mikkelsen 2019-02-01 14:58:55 UTC
This doesn't seem like a bug to me. Is there officially required Posix behaviour? I reported the opposite of this bug some time ago:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205358

https://github.com/libarchive/libarchive/issues/708

For me, not failing when an input file can't be found is a problem. To not fail on a file moving seems like something that should be explicitly requested with a command line option.
Comment 8 Eugene Grosbein freebsd_committer freebsd_triage 2019-02-01 15:02:11 UTC
(In reply to janm from comment #7)

This makes it *impossible* to create tar archive of living file system with constantly added/removed temporary files and large directory structure. And this is *regression* after move from GNU tar. The reference to POSIX does not seem useful to me from practical point of view.
Comment 9 Eugene Grosbein freebsd_committer freebsd_triage 2019-02-01 15:04:37 UTC
(In reply to janm from comment #7)

The PR 205358 deals with distinct problem concerning input path. I'm talking about files found while walking subdirectories recursively.
Comment 10 Jan Martin Mikkelsen 2019-02-01 15:09:30 UTC
(In reply to Eugene Grosbein from comment #9)

Yes, I see your point: Walking the tree is different to command line specified names being absent.
Comment 11 lgfbsd 2019-02-01 15:31:49 UTC
For what it's worth, POSIX does not have language that in any way touches on this issue.

The safe way to back up live filesystems on FreeBSD is by working on a snapshot. dump(8) even has built-in options for doing this. That said, I don't see any problems with the proposed change.
Comment 12 Eugene Grosbein freebsd_committer freebsd_triage 2019-02-01 15:54:16 UTC
(In reply to lgfbsd from comment #11)

Creation of UFS snapshots of filesystems having lots of files is inefficient, slow and was prone to deadlocks in 10.3-STABLE (I still run a couple of such hosts and one of them deadlocked last week on UFS shapshot creation). I'm not sure if that bug was fixed or not in modern versions.

Anyway, GNU tar had no such problem for many years and I do not see why bsdtar should break on ENOENT.
Comment 13 Martin Matuska freebsd_committer freebsd_triage 2019-02-03 23:00:25 UTC
Hi Eugene, I have modified your patch to operate only if descended into subdirectories. It has broken the missing file test because missing files on top-level have been ignored as well. Sometimes more files are processed at a time, so it was necessary to process the error string a bit differently as well.

Could you please check the libarchive pull request #1131 if it fixes your issue? 
https://github.com/libarchive/libarchive/pull/1131
Comment 14 commit-hook freebsd_committer freebsd_triage 2019-02-12 22:30:39 UTC
A commit references this bug:

Author: mm
Date: Tue Feb 12 22:29:45 UTC 2019
New revision: 344063
URL: https://svnweb.freebsd.org/changeset/base/344063

Log:
  Update vendor/libarchive/dist to git 31c0a517c91f44eeee717a04db8b075cadda83d8

  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

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

Changes:
  vendor/libarchive/dist/.cirrus.yml
  vendor/libarchive/dist/.travis.yml
  vendor/libarchive/dist/CMakeLists.txt
  vendor/libarchive/dist/Makefile.am
  vendor/libarchive/dist/build/ci/
  vendor/libarchive/dist/build/ci/build.sh
  vendor/libarchive/dist/build/ci/cirrus_ci.sh
  vendor/libarchive/dist/build/ci/test_driver
  vendor/libarchive/dist/build/ci_build.sh
  vendor/libarchive/dist/build/ci_test_driver
  vendor/libarchive/dist/contrib/shar/tree.c
  vendor/libarchive/dist/cpio/test/test_option_t.c
  vendor/libarchive/dist/libarchive/CMakeLists.txt
  vendor/libarchive/dist/libarchive/archive_acl.c
  vendor/libarchive/dist/libarchive/archive_disk_acl_sunos.c
  vendor/libarchive/dist/libarchive/archive_entry.c
  vendor/libarchive/dist/libarchive/archive_pack_dev.c
  vendor/libarchive/dist/libarchive/archive_ppmd8.c
  vendor/libarchive/dist/libarchive/archive_ppmd8_private.h
  vendor/libarchive/dist/libarchive/archive_read_disk_posix.c
  vendor/libarchive/dist/libarchive/archive_read_open_file.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_7zip.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_ar.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_rar5.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_xar.c
  vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c
  vendor/libarchive/dist/libarchive/archive_write_disk_posix.c
  vendor/libarchive/dist/libarchive/archive_write_disk_set_standard_lookup.c
  vendor/libarchive/dist/libarchive/archive_write_disk_windows.c
  vendor/libarchive/dist/libarchive/archive_write_set_format_ar.c
  vendor/libarchive/dist/libarchive/archive_write_set_format_cpio.c
  vendor/libarchive/dist/libarchive/archive_write_set_format_cpio_newc.c
  vendor/libarchive/dist/libarchive/archive_write_set_format_gnutar.c
  vendor/libarchive/dist/libarchive/archive_write_set_format_shar.c
  vendor/libarchive/dist/libarchive/archive_write_set_format_ustar.c
  vendor/libarchive/dist/libarchive/archive_write_set_format_v7tar.c
  vendor/libarchive/dist/libarchive/archive_write_set_format_zip.c
  vendor/libarchive/dist/libarchive/test/CMakeLists.txt
  vendor/libarchive/dist/libarchive/test/test_compat_pax_libarchive_2x.c
  vendor/libarchive/dist/libarchive/test/test_compat_pax_libarchive_2x.tar.Z.uu
  vendor/libarchive/dist/libarchive/test/test_read_format_zip.c
  vendor/libarchive/dist/libarchive/test/test_read_format_zip_bzip2.zipx.uu
  vendor/libarchive/dist/libarchive/test/test_read_format_zip_bzip2_multi.zipx.uu
  vendor/libarchive/dist/libarchive/test/test_read_format_zip_lzma.zipx.uu
  vendor/libarchive/dist/libarchive/test/test_read_format_zip_lzma_multi.zipx.uu
  vendor/libarchive/dist/libarchive/test/test_read_format_zip_ppmd8.zipx.uu
  vendor/libarchive/dist/libarchive/test/test_read_format_zip_ppmd8_multi.zipx.uu
  vendor/libarchive/dist/libarchive/test/test_read_format_zip_xz_multi.zipx.uu
  vendor/libarchive/dist/test_utils/test_main.c
Comment 15 commit-hook freebsd_committer freebsd_triage 2019-02-12 23:25:24 UTC
A commit references this bug:

Author: mm
Date: Tue Feb 12 23:24:47 UTC 2019
New revision: 344065
URL: https://svnweb.freebsd.org/changeset/base/344065

Log:
  MFV 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

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

Changes:
_U  head/contrib/libarchive/
  head/contrib/libarchive/cpio/test/test_option_t.c
  head/contrib/libarchive/libarchive/archive_acl.c
  head/contrib/libarchive/libarchive/archive_entry.c
  head/contrib/libarchive/libarchive/archive_pack_dev.c
  head/contrib/libarchive/libarchive/archive_ppmd8.c
  head/contrib/libarchive/libarchive/archive_ppmd8_private.h
  head/contrib/libarchive/libarchive/archive_read_disk_posix.c
  head/contrib/libarchive/libarchive/archive_read_open_file.c
  head/contrib/libarchive/libarchive/archive_read_support_format_7zip.c
  head/contrib/libarchive/libarchive/archive_read_support_format_ar.c
  head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c
  head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c
  head/contrib/libarchive/libarchive/archive_read_support_format_rar5.c
  head/contrib/libarchive/libarchive/archive_read_support_format_xar.c
  head/contrib/libarchive/libarchive/archive_read_support_format_zip.c
  head/contrib/libarchive/libarchive/archive_write_disk_posix.c
  head/contrib/libarchive/libarchive/archive_write_disk_set_standard_lookup.c
  head/contrib/libarchive/libarchive/archive_write_set_format_ar.c
  head/contrib/libarchive/libarchive/archive_write_set_format_cpio.c
  head/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c
  head/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c
  head/contrib/libarchive/libarchive/archive_write_set_format_shar.c
  head/contrib/libarchive/libarchive/archive_write_set_format_ustar.c
  head/contrib/libarchive/libarchive/archive_write_set_format_v7tar.c
  head/contrib/libarchive/libarchive/archive_write_set_format_zip.c
  head/contrib/libarchive/libarchive/test/test_compat_pax_libarchive_2x.c
  head/contrib/libarchive/libarchive/test/test_compat_pax_libarchive_2x.tar.Z.uu
  head/contrib/libarchive/libarchive/test/test_read_format_zip.c
  head/contrib/libarchive/libarchive/test/test_read_format_zip_bzip2.zipx.uu
  head/contrib/libarchive/libarchive/test/test_read_format_zip_bzip2_multi.zipx.uu
  head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma.zipx.uu
  head/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_multi.zipx.uu
  head/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8.zipx.uu
  head/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8_multi.zipx.uu
  head/contrib/libarchive/libarchive/test/test_read_format_zip_xz_multi.zipx.uu
  head/contrib/libarchive/test_utils/test_main.c
  head/lib/libarchive/Makefile
  head/lib/libarchive/tests/Makefile
Comment 16 Rodney W. Grimes freebsd_committer freebsd_triage 2019-02-13 01:45:56 UTC
Please do not put bugs on stable@, current@, hackers@, etc
Comment 17 Eugene Grosbein freebsd_committer freebsd_triage 2019-02-14 09:24:37 UTC
(In reply to Martin Matuska from comment #13)

Sorry for late replay. I finally managed to get to my server, back out my patch and test your version and it works just fine. I see you already committed this to head. Any plans to MFC to stable branches?
Comment 18 Martin Matuska freebsd_committer freebsd_triage 2019-02-14 10:22:08 UTC
Just read the commit message :-)
MFC after:	2 weeks
Comment 19 commit-hook freebsd_committer freebsd_triage 2019-02-28 22:56:03 UTC
A commit references this bug:

Author: mm
Date: Thu Feb 28 22:55:46 UTC 2019
New revision: 344672
URL: https://svnweb.freebsd.org/changeset/base/344672

Log:
  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]

Changes:
_U  stable/12/
  stable/12/contrib/libarchive/cpio/test/test_option_t.c
  stable/12/contrib/libarchive/libarchive/archive_acl.c
  stable/12/contrib/libarchive/libarchive/archive_entry.c
  stable/12/contrib/libarchive/libarchive/archive_pack_dev.c
  stable/12/contrib/libarchive/libarchive/archive_ppmd8.c
  stable/12/contrib/libarchive/libarchive/archive_ppmd8_private.h
  stable/12/contrib/libarchive/libarchive/archive_read_disk_posix.c
  stable/12/contrib/libarchive/libarchive/archive_read_open_file.c
  stable/12/contrib/libarchive/libarchive/archive_read_support_format_7zip.c
  stable/12/contrib/libarchive/libarchive/archive_read_support_format_ar.c
  stable/12/contrib/libarchive/libarchive/archive_read_support_format_cpio.c
  stable/12/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c
  stable/12/contrib/libarchive/libarchive/archive_read_support_format_rar5.c
  stable/12/contrib/libarchive/libarchive/archive_read_support_format_xar.c
  stable/12/contrib/libarchive/libarchive/archive_read_support_format_zip.c
  stable/12/contrib/libarchive/libarchive/archive_write_disk_posix.c
  stable/12/contrib/libarchive/libarchive/archive_write_disk_set_standard_lookup.c
  stable/12/contrib/libarchive/libarchive/archive_write_set_format_ar.c
  stable/12/contrib/libarchive/libarchive/archive_write_set_format_cpio.c
  stable/12/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c
  stable/12/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c
  stable/12/contrib/libarchive/libarchive/archive_write_set_format_shar.c
  stable/12/contrib/libarchive/libarchive/archive_write_set_format_ustar.c
  stable/12/contrib/libarchive/libarchive/archive_write_set_format_v7tar.c
  stable/12/contrib/libarchive/libarchive/archive_write_set_format_zip.c
  stable/12/contrib/libarchive/libarchive/test/test_compat_pax_libarchive_2x.c
  stable/12/contrib/libarchive/libarchive/test/test_compat_pax_libarchive_2x.tar.Z.uu
  stable/12/contrib/libarchive/libarchive/test/test_read_format_zip.c
  stable/12/contrib/libarchive/libarchive/test/test_read_format_zip_bzip2.zipx.uu
  stable/12/contrib/libarchive/libarchive/test/test_read_format_zip_bzip2_multi.zipx.uu
  stable/12/contrib/libarchive/libarchive/test/test_read_format_zip_lzma.zipx.uu
  stable/12/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_multi.zipx.uu
  stable/12/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8.zipx.uu
  stable/12/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8_multi.zipx.uu
  stable/12/contrib/libarchive/libarchive/test/test_read_format_zip_xz_multi.zipx.uu
  stable/12/contrib/libarchive/test_utils/test_main.c
  stable/12/lib/libarchive/Makefile
  stable/12/lib/libarchive/tests/Makefile
Comment 20 commit-hook freebsd_committer freebsd_triage 2019-02-28 22:57:07 UTC
A commit references this bug:

Author: mm
Date: Thu Feb 28 22:56:16 UTC 2019
New revision: 344673
URL: https://svnweb.freebsd.org/changeset/base/344673

Log:
  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]

Changes:
_U  stable/11/
  stable/11/contrib/libarchive/cpio/test/test_option_t.c
  stable/11/contrib/libarchive/libarchive/archive_acl.c
  stable/11/contrib/libarchive/libarchive/archive_entry.c
  stable/11/contrib/libarchive/libarchive/archive_pack_dev.c
  stable/11/contrib/libarchive/libarchive/archive_ppmd8.c
  stable/11/contrib/libarchive/libarchive/archive_ppmd8_private.h
  stable/11/contrib/libarchive/libarchive/archive_read_disk_posix.c
  stable/11/contrib/libarchive/libarchive/archive_read_open_file.c
  stable/11/contrib/libarchive/libarchive/archive_read_support_format_7zip.c
  stable/11/contrib/libarchive/libarchive/archive_read_support_format_ar.c
  stable/11/contrib/libarchive/libarchive/archive_read_support_format_cpio.c
  stable/11/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c
  stable/11/contrib/libarchive/libarchive/archive_read_support_format_rar5.c
  stable/11/contrib/libarchive/libarchive/archive_read_support_format_xar.c
  stable/11/contrib/libarchive/libarchive/archive_read_support_format_zip.c
  stable/11/contrib/libarchive/libarchive/archive_write_disk_posix.c
  stable/11/contrib/libarchive/libarchive/archive_write_disk_set_standard_lookup.c
  stable/11/contrib/libarchive/libarchive/archive_write_set_format_ar.c
  stable/11/contrib/libarchive/libarchive/archive_write_set_format_cpio.c
  stable/11/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c
  stable/11/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c
  stable/11/contrib/libarchive/libarchive/archive_write_set_format_shar.c
  stable/11/contrib/libarchive/libarchive/archive_write_set_format_ustar.c
  stable/11/contrib/libarchive/libarchive/archive_write_set_format_v7tar.c
  stable/11/contrib/libarchive/libarchive/archive_write_set_format_zip.c
  stable/11/contrib/libarchive/libarchive/test/test_compat_pax_libarchive_2x.c
  stable/11/contrib/libarchive/libarchive/test/test_compat_pax_libarchive_2x.tar.Z.uu
  stable/11/contrib/libarchive/libarchive/test/test_read_format_zip.c
  stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_bzip2.zipx.uu
  stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_bzip2_multi.zipx.uu
  stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_lzma.zipx.uu
  stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_multi.zipx.uu
  stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8.zipx.uu
  stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8_multi.zipx.uu
  stable/11/contrib/libarchive/libarchive/test/test_read_format_zip_xz_multi.zipx.uu
  stable/11/contrib/libarchive/test_utils/test_main.c
  stable/11/lib/libarchive/Makefile
  stable/11/lib/libarchive/tests/Makefile
Comment 21 commit-hook freebsd_committer freebsd_triage 2019-02-28 22:58:11 UTC
A commit references this bug:

Author: mm
Date: Thu Feb 28 22:57:11 UTC 2019
New revision: 344674
URL: https://svnweb.freebsd.org/changeset/base/344674

Log:
  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]

Changes:
_U  stable/10/
  stable/10/contrib/libarchive/cpio/test/test_option_t.c
  stable/10/contrib/libarchive/libarchive/archive_acl.c
  stable/10/contrib/libarchive/libarchive/archive_entry.c
  stable/10/contrib/libarchive/libarchive/archive_pack_dev.c
  stable/10/contrib/libarchive/libarchive/archive_ppmd8.c
  stable/10/contrib/libarchive/libarchive/archive_ppmd8_private.h
  stable/10/contrib/libarchive/libarchive/archive_read_disk_posix.c
  stable/10/contrib/libarchive/libarchive/archive_read_open_file.c
  stable/10/contrib/libarchive/libarchive/archive_read_support_format_7zip.c
  stable/10/contrib/libarchive/libarchive/archive_read_support_format_ar.c
  stable/10/contrib/libarchive/libarchive/archive_read_support_format_cpio.c
  stable/10/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c
  stable/10/contrib/libarchive/libarchive/archive_read_support_format_rar5.c
  stable/10/contrib/libarchive/libarchive/archive_read_support_format_xar.c
  stable/10/contrib/libarchive/libarchive/archive_read_support_format_zip.c
  stable/10/contrib/libarchive/libarchive/archive_write_disk_posix.c
  stable/10/contrib/libarchive/libarchive/archive_write_disk_set_standard_lookup.c
  stable/10/contrib/libarchive/libarchive/archive_write_set_format_ar.c
  stable/10/contrib/libarchive/libarchive/archive_write_set_format_cpio.c
  stable/10/contrib/libarchive/libarchive/archive_write_set_format_cpio_newc.c
  stable/10/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c
  stable/10/contrib/libarchive/libarchive/archive_write_set_format_shar.c
  stable/10/contrib/libarchive/libarchive/archive_write_set_format_ustar.c
  stable/10/contrib/libarchive/libarchive/archive_write_set_format_v7tar.c
  stable/10/contrib/libarchive/libarchive/archive_write_set_format_zip.c
  stable/10/contrib/libarchive/libarchive/test/test_compat_pax_libarchive_2x.c
  stable/10/contrib/libarchive/libarchive/test/test_compat_pax_libarchive_2x.tar.Z.uu
  stable/10/contrib/libarchive/libarchive/test/test_read_format_zip.c
  stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_bzip2.zipx.uu
  stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_bzip2_multi.zipx.uu
  stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_lzma.zipx.uu
  stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_lzma_multi.zipx.uu
  stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8.zipx.uu
  stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_ppmd8_multi.zipx.uu
  stable/10/contrib/libarchive/libarchive/test/test_read_format_zip_xz_multi.zipx.uu
  stable/10/contrib/libarchive/test_utils/test_main.c
  stable/10/lib/libarchive/Makefile
  stable/10/lib/libarchive/tests/Makefile
Comment 22 Eugene Grosbein freebsd_committer freebsd_triage 2019-03-01 04:37:50 UTC
Thank you!