]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
2 years agoFix out of bounds read in Windows symlink support 1786/head
Erik Olofsson [Thu, 6 Oct 2022 11:13:20 +0000 (13:13 +0200)] 
Fix out of bounds read in Windows symlink support

2 years agoFix potential out-of-bounds reads
Erik Olofsson [Thu, 6 Oct 2022 11:12:56 +0000 (13:12 +0200)] 
Fix potential out-of-bounds reads

2 years agoMerge pull request #1721 from wangkerong/master
Tim Kientzle [Sat, 1 Oct 2022 16:53:23 +0000 (09:53 -0700)] 
Merge pull request #1721 from wangkerong/master

libarchive:uninitialized value

2 years agoMerge pull request #1777 from vtorri/vtorri_win10_1
Tim Kientzle [Sat, 1 Oct 2022 16:46:21 +0000 (09:46 -0700)] 
Merge pull request #1777 from vtorri/vtorri_win10_1

cmake: update possible values of WINDOWS_VERSION to also support Windows 10

2 years agoMerge pull request #1783 from vangyzen/issue1782
Tim Kientzle [Sat, 1 Oct 2022 16:42:16 +0000 (09:42 -0700)] 
Merge pull request #1783 from vangyzen/issue1782

Support reading mtree files with tabs

2 years agoMerge pull request #1781 from neheb/pkgconfigh
Tim Kientzle [Sat, 1 Oct 2022 16:41:05 +0000 (09:41 -0700)] 
Merge pull request #1781 from neheb/pkgconfigh

cmake: use pkgconfig for zstd lookup

2 years agoSupport reading mtree files with tabs 1783/head
Eric van Gyzen [Fri, 30 Sep 2022 15:28:09 +0000 (10:28 -0500)] 
Support reading mtree files with tabs

Commit 45c5008c4 requires all characters in an mtree file to be
printable, as determined by `isprint()`.  This broke support for
reading mtree files with tab characters, which are valid and otherwise
supported by libarchive.  Allow them.  Add a unit test.

Fixes #1782

2 years agocmake: use pkgconfig for zstd lookup 1781/head
Rosen Penev [Fri, 30 Sep 2022 08:51:08 +0000 (01:51 -0700)] 
cmake: use pkgconfig for zstd lookup

As libzstd typically comes with a pkgconfig file, use it.

Fixes compilation at least on OpenWrt where host paths were leaking into
the build.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years agocmake: update possible values of WINDOWS_VERSION to also support Windows 10 1777/head
Vincent Torri [Tue, 20 Sep 2022 05:07:20 +0000 (07:07 +0200)] 
cmake: update possible values of WINDOWS_VERSION to also support Windows 10

2 years agoMerge pull request #1736 from uckelman-sf/mingw_fixes
Martin Matuška [Mon, 5 Sep 2022 12:56:09 +0000 (14:56 +0200)] 
Merge pull request #1736 from uckelman-sf/mingw_fixes

Fixes for running tests on Windows (or Wine)

3 years agoMerge pull request #1761 from kraj/master
Tim Kientzle [Fri, 5 Aug 2022 02:43:12 +0000 (19:43 -0700)] 
Merge pull request #1761 from kraj/master

libarchive: Remove unneeded linux/fs.h include

3 years agoMerge pull request #1745 from bobrofon/rar5-read_data_block
Tim Kientzle [Fri, 5 Aug 2022 02:30:29 +0000 (19:30 -0700)] 
Merge pull request #1745 from bobrofon/rar5-read_data_block

rar5: Fix random initial offset if using archive_read_data_into_fd

3 years agoMerge pull request #1751 from yugr/hide-symbols
Tim Kientzle [Sun, 31 Jul 2022 16:06:34 +0000 (09:06 -0700)] 
Merge pull request #1751 from yugr/hide-symbols

Hide internal symbols on platforms that support visibility annotations

3 years agoAdded missing file to CMakeLists. 1751/head
Yuri Gribov [Wed, 27 Jul 2022 18:30:57 +0000 (21:30 +0300)] 
Added missing file to CMakeLists.

3 years agoHide internal symbols on platforms that support visibility annotations (see discussio...
Yuri Gribov [Sun, 3 Jul 2022 07:54:39 +0000 (10:54 +0300)] 
Hide internal symbols on platforms that support visibility annotations (see discussion in gh-1017).

3 years agolibarchive: Do not include sys/mount.h when linux/fs.h is present 1761/head
Khem Raj [Mon, 25 Jul 2022 17:56:53 +0000 (10:56 -0700)] 
libarchive: Do not include sys/mount.h when linux/fs.h is present

These headers are in conflict and only one is needed by
archive_read_disk_posix.c therefore include linux/fs.h if it exists
otherwise include sys/mount.h

It also helps compiling with glibc 2.36
where sys/mount.h conflicts with linux/mount.h see [1]

[1] https://sourceware.org/glibc/wiki/Release/2.36

3 years agoMerge pull request #1753 from bungeman/check_size_attribute
Tim Kientzle [Mon, 25 Jul 2022 00:29:23 +0000 (17:29 -0700)] 
Merge pull request #1753 from bungeman/check_size_attribute

Validate entry_bytes_remaining in pax_attribute

3 years agoValidate entry_bytes_remaining in pax_attribute 1753/head
Ben Wagner [Tue, 19 Jul 2022 17:02:40 +0000 (13:02 -0400)] 
Validate entry_bytes_remaining in pax_attribute

The `size` attribute may contain a negative or too large value. Check
the range of the `entry_bytes_remaining` in `pax_attribute` the same way
as `header_common`. The test which is added passes both with and without
this change in a normal debug build. It is necessary to run with
`-fsanitize=undefined` to see that the undefined behavior is avoided.

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=48467

3 years agoMerge pull request #1759 from obiwac/fix-1754
Tim Kientzle [Sun, 24 Jul 2022 06:50:07 +0000 (23:50 -0700)] 
Merge pull request #1759 from obiwac/fix-1754

libarchive: Handle a `calloc` returning NULL (fixes #1754)

3 years agolibarchive: Handle a `calloc` returning NULL (fixes #1754) 1759/head
obiwac [Fri, 22 Jul 2022 20:41:10 +0000 (22:41 +0200)] 
libarchive: Handle a `calloc` returning NULL (fixes #1754)

3 years agoClean up the condition so we check EINVAL on Windows only. 1736/head
Joel Uckelman [Thu, 30 Jun 2022 13:12:43 +0000 (14:12 +0100)] 
Clean up the condition so we check EINVAL on Windows only.

3 years agorar5: Fix random initial offset if using archive_read_data_into_fd 1745/head
Sergey Bobrenok [Sat, 25 Jun 2022 17:12:52 +0000 (20:12 +0300)] 
rar5: Fix random initial offset if using archive_read_data_into_fd

archive_read_data_into_fd passes a pointer to an uninitialized
variable as an output 'offset' argument into archive_read_data_block
function, and expects that this variable will always be initialized
inside of it.

Like this:
  size_t size;
  int64_t offset;
  archive_read_data_block(a, &buf, &size, &offset);
  /* some work with offset here */

But rar5 implementation of archive_read_data_block function leaves the
'offset' argument uninitialized in one code path (if file is
compressed and there are no uncompressed pending data blocks).

As a result, archive_read_data_info_fd function is using an
uninitialized variable as an initial offset of an output file. And in
most cases it causes an appending sparse block of a random size at the
beginning of the output file.

3 years agoMerge pull request #1688 from hemnstill/zstd_windows
Martin Matuška [Wed, 29 Jun 2022 08:41:30 +0000 (10:41 +0200)] 
Merge pull request #1688 from hemnstill/zstd_windows

include zstd 1.5.2 on windows ci builds

3 years agoMerge pull request #1744 from seanm/snprintf
Martin Matuška [Wed, 29 Jun 2022 08:41:03 +0000 (10:41 +0200)] 
Merge pull request #1744 from seanm/snprintf

Fixed issue #1743: Changed sprintf to safer snprintf

3 years agoFixed issue #1743: Changed sprintf to safer snprintf 1744/head
Sean McBride [Wed, 22 Jun 2022 16:22:42 +0000 (12:22 -0400)] 
Fixed issue #1743: Changed sprintf to safer snprintf

Also changed a few vsprintf to vsnprintf.

Most cases were trivial, one private function was changed to take the buffer length, one case required some fancy arithmetic.

3 years agoMerge branch 'libarchive:master' into zstd_windows 1688/head
Alexandr Reshetnikov [Sun, 19 Jun 2022 19:10:18 +0000 (23:10 +0400)] 
Merge branch 'libarchive:master' into zstd_windows

3 years agoMerge pull request #1729 from bog-dan-ro/fix_comiple_android
Martin Matuška [Sun, 19 Jun 2022 06:36:18 +0000 (08:36 +0200)] 
Merge pull request #1729 from bog-dan-ro/fix_comiple_android

Fix compile on Android

3 years agoMerge pull request #1732 from asuka-mio/master
Martin Matuška [Sun, 19 Jun 2022 06:33:03 +0000 (08:33 +0200)] 
Merge pull request #1732 from asuka-mio/master

Bionic c deprecates readdir_r too

3 years agoMerge pull request #1742 from emaste/master
Martin Matuška [Sun, 19 Jun 2022 06:27:38 +0000 (08:27 +0200)] 
Merge pull request #1742 from emaste/master

CI: update FreeBSD versions

3 years agoMerge branch 'libarchive:master' into zstd_windows
Alexandr Reshetnikov [Fri, 17 Jun 2022 16:21:33 +0000 (20:21 +0400)] 
Merge branch 'libarchive:master' into zstd_windows

3 years agoCI: update FreeBSD versions 1742/head
Ed Maste [Wed, 15 Jun 2022 17:01:05 +0000 (13:01 -0400)] 
CI: update FreeBSD versions

Update to latest released versions (12.3 and 13.1), and drop now-EOL 11.4.

3 years agoMerge pull request #1739 from janstary/width
Tim Kientzle [Sun, 5 Jun 2022 23:45:04 +0000 (16:45 -0700)] 
Merge pull request #1739 from janstary/width

fix Bl -width

3 years agofix Bl -width 1739/head
Jan Starý [Sun, 5 Jun 2022 21:02:05 +0000 (23:02 +0200)] 
fix Bl -width

3 years agoSkip match_time tests when running on Windows, since the ctime can't be set
Zack Weger [Fri, 12 Oct 2018 15:36:44 +0000 (11:36 -0400)] 
Skip match_time tests when running on Windows, since the ctime can't be set

3 years agoFiles with invalid names don't exist, so don't set an error
Zack Weger [Mon, 8 Oct 2018 15:17:10 +0000 (11:17 -0400)] 
Files with invalid names don't exist, so don't set an error

3 years agoMerge pull request #1724 from elieux-contrib/wincrypto-sha256-384-512-fix
Martin Matuška [Sun, 29 May 2022 07:35:22 +0000 (09:35 +0200)] 
Merge pull request #1724 from elieux-contrib/wincrypto-sha256-384-512-fix

archive_digest: Use correct providers with Windows Crypto

3 years agoMerge pull request #1730 from gportay/fix-documentation
Martin Matuška [Sun, 29 May 2022 07:33:28 +0000 (09:33 +0200)] 
Merge pull request #1730 from gportay/fix-documentation

archive_write_open.3, archive_read_open.3: ends

3 years agoBionic c deprecates readdir_r too 1732/head
tarsin [Sat, 21 May 2022 12:44:30 +0000 (20:44 +0800)] 
Bionic c deprecates readdir_r too

* See https://android.googlesource.com/platform/bionic/+/f19af37b5ee6cd5283683195d692fe3f713db2a5

3 years agoFix compile on Android 1729/head
BogDan Vatra [Tue, 3 May 2022 10:16:07 +0000 (13:16 +0300)] 
Fix compile on Android

Fixes: #890
3 years agoarchive_write_open.3, archive_read_open.3: ends 1730/head
Gaël PORTAY [Thu, 12 May 2022 08:00:38 +0000 (10:00 +0200)] 
archive_write_open.3, archive_read_open.3: ends

3 years agoMerge remote-tracking branch 'remotes/origin/master' into zstd_windows
Reshetnikov Alexandr [Thu, 28 Apr 2022 19:35:05 +0000 (23:35 +0400)] 
Merge remote-tracking branch 'remotes/origin/master' into zstd_windows

3 years agoarchive_digest: Use correct providers with Windows Crypto 1724/head
David Macek [Sun, 17 Apr 2022 17:52:25 +0000 (19:52 +0200)] 
archive_digest: Use correct providers with Windows Crypto

Trying to use SHA256, SHA384 or SHA512 with mtree when linked against
Windows Crypto would result in silent failure.  The call to
`CryptCreateHash` would fail with 0x80090008.  The docs[1] say that
these algorithms require a different crypto provider, so let's make
that a parameter for `win_crypto_init` and choose at the call site along
with the algorithm.

[1] https://docs.microsoft.com/en-us/windows/win32/seccrypto/alg-id

Signed-off-by: David Macek <david.macek.0@gmail.com>
3 years agoMerge pull request #1723 from Biswa96/win32-static-openssl
Martin Matuška [Sat, 16 Apr 2022 11:05:02 +0000 (13:05 +0200)] 
Merge pull request #1723 from Biswa96/win32-static-openssl

autotools: Fix static linking when openssl is enabled in windows

3 years agoautotools: Fix static linking when openssl is enabled in windows 1723/head
Biswapriyo Nath [Wed, 13 Apr 2022 04:18:44 +0000 (09:48 +0530)] 
autotools: Fix static linking when openssl is enabled in windows

This adds Requires.private field in pkgconfig file. Using that field,
pkgconfig pulls all the private cflags or libs while static linking.
OpenSSL static libraries require some windows system libraies. Otherwise
static liking fails with libarchive.

3 years agoMerge remote-tracking branch 'remotes/origin/master' into zstd_windows
Reshetnikov Alexandr [Tue, 12 Apr 2022 09:48:51 +0000 (13:48 +0400)] 
Merge remote-tracking branch 'remotes/origin/master' into zstd_windows

# Conflicts:
# build/ci/github_actions/ci.cmd

3 years agoMerge pull request #1714 from Biswa96/win32-openssl
Martin Matuška [Mon, 11 Apr 2022 14:27:45 +0000 (16:27 +0200)] 
Merge pull request #1714 from Biswa96/win32-openssl

Revert "Fix check for openssl on Windows"

3 years agoMerge pull request #1720 from eworm-de/markdown
Martin Matuška [Mon, 11 Apr 2022 14:26:25 +0000 (16:26 +0200)] 
Merge pull request #1720 from eworm-de/markdown

README: fix markdown syntax

3 years agolibarchive:uninitialized value 1721/head
wangkerong [Sat, 9 Apr 2022 07:08:03 +0000 (15:08 +0800)] 
libarchive:uninitialized value

Uninitialized variable crash error in oss_fuzz memory type test

3 years agoRevert "Fix check for openssl on Windows" 1714/head
Biswapriyo Nath [Sun, 3 Apr 2022 08:54:04 +0000 (14:24 +0530)] 
Revert "Fix check for openssl on Windows"

This reverts commit 045e5c5a4460020e513516a5d1f3087094e67da3
For Windows platform, openssl 1.0.2 and earlier versions have
eay64 and eay32 libraries[1]. But from openssl 1.1.0 and above
versions have same library name[2] (libcrypto and libssl) like
other unix-like platforms.

[1]: https://wiki.openssl.org/index.php/Compilation_and_Installation#OpenSSL_1.0.2
[2]: https://wiki.openssl.org/index.php/Compilation_and_Installation#OpenSSL_1.1.0

3 years agoREADME: fix markdown syntax 1720/head
Christian Hesse [Fri, 8 Apr 2022 19:52:05 +0000 (21:52 +0200)] 
README: fix markdown syntax

Some markdown implementations (python-markdown) require an empty line
before lists, so just add these.

3 years agoLibarchive 3.6.2dev
Martin Matuska [Fri, 8 Apr 2022 12:47:05 +0000 (14:47 +0200)] 
Libarchive 3.6.2dev

3 years agoCI: Update dependencies for Windows build v3.6.1
Martin Matuska [Fri, 8 Apr 2022 11:13:17 +0000 (13:13 +0200)] 
CI: Update dependencies for Windows build

Upgrade zlib to 1.2.12
Upgrade bzip2 to 10fe37f2e

3 years agoRelease 3.6.1
Martin Matuska [Fri, 8 Apr 2022 10:05:45 +0000 (12:05 +0200)] 
Release 3.6.1

3 years agoMerge pull request #1717 from evelikov/ssl
Martin Matuška [Wed, 6 Apr 2022 23:28:08 +0000 (01:28 +0200)] 
Merge pull request #1717 from evelikov/ssl

archive_digest: check return value of EVP_DigestInit()

3 years agoarchive_digest: check return value of EVP_DigestInit() 1717/head
Emil Velikov [Tue, 5 Apr 2022 10:36:02 +0000 (11:36 +0100)] 
archive_digest: check return value of EVP_DigestInit()

The function returns 0 on error, which is seemingly very common with
OpenSSL 3.0 and rmd160.

Just error check the lot, so we don't get even more random failures with
future releases of OpenSSL.

Fixes #1549

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
3 years agoRAR reader: fix heap-use-after-free in run_filters()
Martin Matuska [Sun, 3 Apr 2022 10:06:24 +0000 (12:06 +0200)] 
RAR reader: fix heap-use-after-free in run_filters()

OSS-Fuzz issue 46279
Fixes #1715

3 years agoinclude zstd 1.5.2 on windows builds
Reshetnikov Alexandr [Thu, 31 Mar 2022 19:15:03 +0000 (23:15 +0400)] 
include zstd 1.5.2 on windows builds

3 years agoISO reader: fix possible heap buffer overflow in read_children()
Martin Matuska [Wed, 30 Mar 2022 19:14:00 +0000 (21:14 +0200)] 
ISO reader: fix possible heap buffer overflow in read_children()

OSS-Fuzz issue: 38764
Fixes #1685

3 years agoZIP reader: fix possible out-of-bounds read in zipx_lzma_alone_init()
Tim Kientzle [Thu, 24 Mar 2022 09:35:00 +0000 (10:35 +0100)] 
ZIP reader: fix possible out-of-bounds read in zipx_lzma_alone_init()

Fixes #1672

3 years agoMerge pull request #1679 from michael-o/hp-ux-dirfd
Martin Matuška [Sat, 12 Mar 2022 09:19:16 +0000 (10:19 +0100)] 
Merge pull request #1679 from michael-o/hp-ux-dirfd

Add macro for dirfd() on HP-UX because no full POSIX.1-2008 coverage …

3 years agoAdd macro for dirfd() on HP-UX because no full POSIX.1-2008 coverage exists 1679/head
Michael Osipov [Thu, 10 Mar 2022 11:56:02 +0000 (12:56 +0100)] 
Add macro for dirfd() on HP-UX because no full POSIX.1-2008 coverage exists

HP-UX does neither provide a function nor a macro. This solution based on an
issue with vim: https://github.com/vim/vim/issues/6838

3 years agobuild: fix detection of readdir_r() and dirfd() in configure.ac
Martin Matuska [Thu, 10 Mar 2022 10:00:26 +0000 (11:00 +0100)] 
build: fix detection of readdir_r() and dirfd() in configure.ac

Fixes #1537

3 years agoMerge pull request #1676 from ken-matsui/patch-2
Tim Kientzle [Sat, 5 Mar 2022 17:45:01 +0000 (09:45 -0800)] 
Merge pull request #1676 from ken-matsui/patch-2

Remove the unused variable `detected_bytes`

3 years agoRemove the unused variable `detected_bytes` 1676/head
Ken Matsui [Sat, 5 Mar 2022 03:12:09 +0000 (12:12 +0900)] 
Remove the unused variable `detected_bytes`

3 years agoMerge pull request #1674 from 0mp/patch-1
Tim Kientzle [Fri, 4 Mar 2022 05:15:53 +0000 (21:15 -0800)] 
Merge pull request #1674 from 0mp/patch-1

Fix use of At mdoc(7) macro

3 years agoFix use of At mdoc(7) macro 1674/head
Mateusz Piotrowski [Thu, 3 Mar 2022 23:01:40 +0000 (00:01 +0100)] 
Fix use of At mdoc(7) macro

3 years agoRAR reader: fix null-dereference in RAR (v4) filter code
Martin Matuska [Sat, 19 Feb 2022 19:43:22 +0000 (20:43 +0100)] 
RAR reader: fix null-dereference in RAR (v4) filter code

Add safety check to run_filters() and fix return codes

Reported-by: OSS-Fuzz #44843
3 years ago7zip reader: style fixes after 3962d596d
Martin Matuska [Fri, 18 Feb 2022 23:38:53 +0000 (00:38 +0100)] 
7zip reader: style fixes after 3962d596d

3 years agoMerge pull request #1670 from bradking/include-platform-first
Martin Matuška [Fri, 18 Feb 2022 23:36:52 +0000 (00:36 +0100)] 
Merge pull request #1670 from bradking/include-platform-first

windows: include archive_platform.h first in blake2s sources

3 years agoMerge pull request #1668 from mgorny/missing-zlib
Martin Matuška [Fri, 18 Feb 2022 23:36:32 +0000 (00:36 +0100)] 
Merge pull request #1668 from mgorny/missing-zlib

Fix some test failures when building --without-zlib

3 years agoMerge pull request #1671 from cielavenir/fix7zPPMDReadBeyondBoundary
Martin Matuška [Fri, 18 Feb 2022 23:35:44 +0000 (00:35 +0100)] 
Merge pull request #1671 from cielavenir/fix7zPPMDReadBeyondBoundary

Fix 7z PPMD reading beyond boundary

3 years agocode review 1671/head
cielavenir [Fri, 18 Feb 2022 15:23:16 +0000 (00:23 +0900)] 
code review

3 years agoFix 7z PPMD reading beyond boundary
cielavenir [Fri, 18 Feb 2022 09:19:12 +0000 (18:19 +0900)] 
Fix 7z PPMD reading beyond boundary

3 years agoci (GitHub Actions): build on Windows 2022 and use Visual Studio 17 2022
Martin Matuska [Thu, 17 Feb 2022 16:09:00 +0000 (17:09 +0100)] 
ci (GitHub Actions): build on Windows 2022 and use Visual Studio 17 2022

3 years agoRAR reader: fix heap-use-after-free in RAR (v4) filter code
Martin Matuska [Wed, 16 Feb 2022 20:36:41 +0000 (21:36 +0100)] 
RAR reader: fix heap-use-after-free in RAR (v4) filter code

Rework function expand() to process integer passed by reference
and return an archive error code.

Fixes: 01a2d329dfc7 (support rar filters)
Reported-by: OSS-Fuzz #44547
3 years agowindows: include archive_platform.h first in blake2s sources 1670/head
Brad King [Wed, 16 Feb 2022 12:31:56 +0000 (07:31 -0500)] 
windows: include archive_platform.h first in blake2s sources

Move the inclusion added by commit 90978db1 (windows: make sure we use
the right calling convention for libc, 2021-10-13, v3.6.0~39^2~1) to be
first.  This is our convention in all other `.c` sources.  It ensures
that our configured `_WIN32_WINNT` value is defined before including any
system headers.

3 years agotests: reduce sample size for RAR filter test
Martin Matuska [Mon, 14 Feb 2022 00:08:46 +0000 (01:08 +0100)] 
tests: reduce sample size for RAR filter test

3 years agoLibarchive 3.6.1dev
Martin Matuska [Mon, 14 Feb 2022 00:13:03 +0000 (01:13 +0100)] 
Libarchive 3.6.1dev

3 years agoHandle missing zlib in test_read_format_zip_7z_deflate 1668/head
Michał Górny [Sat, 12 Feb 2022 10:12:27 +0000 (11:12 +0100)] 
Handle missing zlib in test_read_format_zip_7z_deflate

3 years agoFix expected error messages in test_read_format_zip_winzip_aes*
Michał Górny [Sat, 12 Feb 2022 10:11:22 +0000 (11:11 +0100)] 
Fix expected error messages in test_read_format_zip_winzip_aes*

Fix expected error messages when libarchive is compiled --without-zlib,
in order to fix test failures.

3 years agoRelease 3.6.0 v3.6.0
Martin Matuska [Wed, 9 Feb 2022 08:41:14 +0000 (09:41 +0100)] 
Release 3.6.0

3 years agoMerge pull request #1665 from juikim/master
Martin Matuška [Wed, 9 Feb 2022 07:35:52 +0000 (08:35 +0100)] 
Merge pull request #1665 from juikim/master

bsdtar(1): Document threads options for zstd and xz

3 years agobsdtar(1): Document threads options for zstd and xz 1665/head
Jung-uk Kim [Wed, 9 Feb 2022 03:03:05 +0000 (22:03 -0500)] 
bsdtar(1): Document threads options for zstd and xz

3 years agoLibarchive 3.6.0dev
Martin Matuska [Tue, 8 Feb 2022 09:47:31 +0000 (10:47 +0100)] 
Libarchive 3.6.0dev

3 years agoCI: add dist-artifact
Martin Matuska [Tue, 8 Feb 2022 08:23:37 +0000 (09:23 +0100)] 
CI: add dist-artifact

3 years agotests: fix style in test_utils/test_main.c
Martin Matuska [Tue, 8 Feb 2022 07:27:11 +0000 (08:27 +0100)] 
tests: fix style in test_utils/test_main.c

3 years agoMerge pull request #1657 from kientzle/ReorganizeTestCode
Martin Matuška [Tue, 8 Feb 2022 07:25:55 +0000 (08:25 +0100)] 
Merge pull request #1657 from kientzle/ReorganizeTestCode

Reorganize test code a bit

3 years agoMerge pull request #1664 from juikim/master
Martin Matuška [Tue, 8 Feb 2022 07:25:23 +0000 (08:25 +0100)] 
Merge pull request #1664 from juikim/master

Enable LZMA support for FreeBSD

3 years agoMerge pull request #1493 from antekone/rar5_ossfuzz_30459
Martin Matuška [Tue, 8 Feb 2022 07:16:45 +0000 (08:16 +0100)] 
Merge pull request #1493 from antekone/rar5_ossfuzz_30459

RAR5 reader: add more checks for invalid extraction parameters

3 years agoRAR5 reader: add more checks for invalid extraction parameters 1493/head
Grzegorz Antoniak [Sat, 13 Feb 2021 09:13:22 +0000 (10:13 +0100)] 
RAR5 reader: add more checks for invalid extraction parameters

Some specially crafted files declare invalid extraction parameters that
can confuse the RAR5 reader.

One of the arguments is the declared window size parameter that the
archive file can declare for each file stored in the archive. Some
crafted files declare window size equal to 0, which is clearly wrong.

This commit adds additional safety checks decreasing the tolerance of
the RAR5 format.

This commit also contains OSSFuzz sample #30459.

3 years agoEnable LZMA support for FreeBSD 1664/head
Jung-uk Kim [Mon, 7 Feb 2022 21:16:34 +0000 (16:16 -0500)] 
Enable LZMA support for FreeBSD

All supported FreeBSD releases have LZMA by default.

3 years agoMerge pull request #1663 from yelkarama/master
Martin Matuška [Mon, 7 Feb 2022 19:59:23 +0000 (20:59 +0100)] 
Merge pull request #1663 from yelkarama/master

Fix typo in libarchive/archive_read_support_filter_lzop.c

3 years agoFix typo in libarchive/archive_read_support_filter_lzop.c 1663/head
Younes El-karama [Mon, 7 Feb 2022 16:30:40 +0000 (11:30 -0500)] 
Fix typo in libarchive/archive_read_support_filter_lzop.c

Extra "dot" in line 176 of libarchive/archive_read_support_filter_lzop.c

3 years agountar.c: style fixes
Martin Matuska [Mon, 7 Feb 2022 09:48:51 +0000 (10:48 +0100)] 
untar.c: style fixes

3 years agotar: fix format name typo in creation_set.c
Martin Matuska [Mon, 7 Feb 2022 08:23:41 +0000 (09:23 +0100)] 
tar: fix format name typo in creation_set.c

Closes #1659

3 years agoMerge pull request #1170 from kidandcat/patch-1
Martin Matuška [Sun, 6 Feb 2022 23:59:09 +0000 (00:59 +0100)] 
Merge pull request #1170 from kidandcat/patch-1

Windows support for contrib/untar

3 years agoUpdate untar.c 1170/head
Jairo [Sun, 6 Feb 2022 23:13:18 +0000 (00:13 +0100)] 
Update untar.c

3 years agoUpdate untar.c
Jairo [Sun, 6 Feb 2022 23:11:02 +0000 (00:11 +0100)] 
Update untar.c

3 years agoMerge pull request #1491 from antekone/rar5_ossfuzz_30442
Martin Matuška [Sun, 6 Feb 2022 18:35:30 +0000 (19:35 +0100)] 
Merge pull request #1491 from antekone/rar5_ossfuzz_30442

RAR5 reader: fix invalid memory access in some files

3 years agoRAR5 reader: fix invalid memory access in some files 1491/head
Grzegorz Antoniak [Fri, 12 Feb 2021 19:18:31 +0000 (20:18 +0100)] 
RAR5 reader: fix invalid memory access in some files

RAR5 reader uses several variables to manage the window buffer during
extraction: the buffer itself (`window_buf`), the current size of the
window buffer (`window_size`), and a helper variable (`window_mask`)
that is used to constrain read and write offsets to the window buffer.

Some specially crafted files can force the unpacker to update the
`window_mask` variable to a value that is out of sync with current
buffer size. If the `window_mask` will be bigger than the actual buffer
size, then an invalid access operation can happen (SIGSEGV).

This commit ensures that if the `window_size` and `window_mask` will be
changed, the window buffer will be reallocated to the proper size, so no
invalid memory operation should be possible.

This commit contains a test file from OSSFuzz #30442.