]>
git.ipfire.org Git - thirdparty/libarchive.git/log
Tobias Stoeckmann [Mon, 22 Jun 2026 05:44:58 +0000 (07:44 +0200)]
Merge pull request #3166 from stoeckmann/unzip_p_enc_test
unzip: Skip another test if zlib unavailable
Tobias Stoeckmann [Sun, 21 Jun 2026 19:07:43 +0000 (21:07 +0200)]
unzip: Skip another test if zlib unavailable
The input file in test_P_encryption uses deflate, which is only
available if zlib is available. Skip the test if built without zlib.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Dustin L. Howett [Sat, 20 Jun 2026 16:34:51 +0000 (11:34 -0500)]
Merge pull request #3164 from stoeckmann/iso9660_realloc
Tobias Stoeckmann [Fri, 19 Jun 2026 15:30:18 +0000 (17:30 +0200)]
iso9660: Remove realloc from idr_extend_identifier
Allocate enough memory with initial malloc for possible additions, which
removes any kind of error handling required in idr_extend_identifier.
The additional memory allocated was already large enough. Clarify
exactly where the required amount comes from by using named constants.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Dustin L. Howett [Fri, 19 Jun 2026 22:19:18 +0000 (17:19 -0500)]
Merge pull request #3165 from stoeckmann/error_zero
Do not set 0 as error code, since this will be printed as success. Use proper error codes in various places for better error messages.
Tobias Stoeckmann [Fri, 19 Jun 2026 15:45:42 +0000 (17:45 +0200)]
Avoid 0 as error code
Do not set 0 as error code, since this will be printed as success. Use
proper error codes in various places for better error messages.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Martin Matuška [Fri, 19 Jun 2026 07:48:25 +0000 (09:48 +0200)]
Merge pull request #2918 from aale24/fix-test-format-newc-race
Fix test_format_newc timestamp race condition
Tobias Stoeckmann [Thu, 18 Jun 2026 20:51:43 +0000 (22:51 +0200)]
Merge pull request #3158 from stoeckmann/cpio_write
cpio: Fix writer OOB read with very long filenames
Dustin L. Howett [Thu, 18 Jun 2026 16:41:47 +0000 (11:41 -0500)]
Merge commit from fork
xattr/sparse: Fix UAF by nullifying pointer
Martin Matuška [Thu, 18 Jun 2026 14:37:15 +0000 (16:37 +0200)]
Merge pull request #3159 from stoeckmann/ckd_size
Use checked size_t arithmetic
Tobias Stoeckmann [Wed, 17 Jun 2026 17:52:36 +0000 (19:52 +0200)]
Use checked size_t arithmetic
Add archive_ckd_add_size and archive_ckd_mul_size. Use them for checked
arithmetic throughout the source code where explicit SIZE_MAX checks
were performed.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Dustin L. Howett [Thu, 18 Jun 2026 02:20:51 +0000 (21:20 -0500)]
Merge pull request #3135 from stoeckmann/read_ahead_format
formats: Simplify `__archive_read_ahead` use
Tobias Stoeckmann [Thu, 11 Jun 2026 15:42:46 +0000 (17:42 +0200)]
formats: Simplify __archive_read_ahead use
Set the third argument to NULL if the amount of actually read bytes is
not needed. This simplifies code audits.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Wed, 17 Jun 2026 17:43:18 +0000 (19:43 +0200)]
cpio: Fix OOB read with very long filenames
If a filename is larger than INT_MAX, eventual size_t/int/size_t
conversions lead to huge size_t values and subsequent OOB reads.
Use correct values. Before this would lead to unnecessary writes, the
filename length field check already aborts the operation.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Wed, 17 Jun 2026 17:36:42 +0000 (19:36 +0200)]
cpio: Verify that filename length fits into field
If the filename length cannot be represented as octal in its field,
return an error instead of silently truncating the value.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Martin Matuška [Wed, 17 Jun 2026 09:30:05 +0000 (11:30 +0200)]
Merge pull request #3157 from libarchive/dependabot/github_actions/all-actions-
0a5d8bb8fa
CI: Bump the all-actions group across 1 directory with 5 updates
Martin Matuška [Wed, 17 Jun 2026 07:29:46 +0000 (09:29 +0200)]
Merge pull request #3150 from DHowett/ci/windows-package-dependencies
build: windows: get all CI dependencies from a package manager
dependabot[bot] [Wed, 17 Jun 2026 07:25:32 +0000 (07:25 +0000)]
CI: Bump the all-actions group across 1 directory with 5 updates
Bumps the all-actions group with 5 updates in the / directory:
| Package | From | To |
| --- | --- | --- |
| [acj/freebsd-firecracker-action](https://github.com/acj/freebsd-firecracker-action) | `0.9.1` | `0.10.0` |
| [actions/checkout](https://github.com/actions/checkout) | `6.0.1` | `6.0.3` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `6.0.0` | `7.0.1` |
| [cygwin/cygwin-install-action](https://github.com/cygwin/cygwin-install-action) | `6.0.1` | `6.0.2` |
| [github/codeql-action](https://github.com/github/codeql-action) | `4.31.9` | `4.36.2` |
Updates `acj/freebsd-firecracker-action` from 0.9.1 to 0.10.0
- [Release notes](https://github.com/acj/freebsd-firecracker-action/releases)
- [Commits](https://github.com/acj/freebsd-firecracker-action/compare/
bab3e77871573c7943b80816f1641b6c1ce36896 ...
ff79eb955fd19c697a708a02834995e47a6e58ed )
Updates `actions/checkout` from 6.0.1 to 6.0.3
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/
8e8c483db84b4bee98b60c0593521ed34d9990e8 ...
df4cb1c069e1874edd31b4311f1884172cec0e10 )
Updates `actions/upload-artifact` from 6.0.0 to 7.0.1
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/
b7c566a772e6b6bfb58ed0dc250532a479d7789f ...
043fb46d1a93c77aae656e7c1c64a875d1fc6a0a )
Updates `cygwin/cygwin-install-action` from 6.0.1 to 6.0.2
- [Release notes](https://github.com/cygwin/cygwin-install-action/releases)
- [Commits](https://github.com/cygwin/cygwin-install-action/compare/
711d29f3da23c9f4a1798e369a6f01198c13b11a ...
3f0a3f9f988f7e96b8c18098ae05eaec175f5b52 )
Updates `github/codeql-action` from 4.31.9 to 4.36.2
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/
5d4e8d1aca955e8d8589aabd499c5cae939e33c7 ...
8aad20d150bbac5944a9f9d289da16a4b0d87c1e )
---
updated-dependencies:
- dependency-name: acj/freebsd-firecracker-action
dependency-version: 0.10.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: all-actions
- dependency-name: actions/checkout
dependency-version: 6.0.3
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: all-actions
- dependency-name: actions/upload-artifact
dependency-version: 7.0.1
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: all-actions
- dependency-name: cygwin/cygwin-install-action
dependency-version: 6.0.2
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: all-actions
- dependency-name: github/codeql-action
dependency-version: 4.36.2
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: all-actions
...
Signed-off-by: dependabot[bot] <support@github.com>
Martin Matuška [Wed, 17 Jun 2026 06:49:31 +0000 (08:49 +0200)]
Merge pull request #3144 from stoeckmann/cab_truncation
cab: Improve truncation detection
Martin Matuška [Wed, 17 Jun 2026 06:48:55 +0000 (08:48 +0200)]
Merge pull request #3134 from stoeckmann/archive_integer
Introduce `archive_integer.h` for checked arithmetic
Tobias Stoeckmann [Wed, 17 Jun 2026 06:32:03 +0000 (08:32 +0200)]
Merge pull request #3145 from stoeckmann/cab_max_namelen
cab: Properly limit maximum name length
Dustin L. Howett [Wed, 17 Jun 2026 02:57:14 +0000 (21:57 -0500)]
Merge pull request #3153 from stoeckmann/cab_multi
cab: Fix multi volume parser
Tobias Stoeckmann [Tue, 16 Jun 2026 19:40:48 +0000 (21:40 +0200)]
cab: Fix name reading
Archives are not necessarily 256 bytes long, e.g. the last part of a
multi volume archive. Only try to read up to 256 bytes when looking for
an archive or disk name, not necessarily exactly 256 bytes. This matches
the behavior of regular entry name lookups.
Also, disk names can be empty. Handle this as well.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Tue, 16 Jun 2026 19:37:55 +0000 (21:37 +0200)]
cab: Add test for multi volume archives
The cab reader does not support multi volume archives, but it should be
able to read the files to print information about content.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Dustin L. Howett [Tue, 16 Jun 2026 01:00:23 +0000 (20:00 -0500)]
Merge pull request #3142 from datauwu/tar-avoid-wcs-slash-check
tar: avoid wide pathname conversion for trailing slash check
Dustin L. Howett [Sun, 7 Jul 2024 23:59:07 +0000 (18:59 -0500)]
build: use vcpkg for Windows-MSVC's dependencies
Dustin L. Howett [Sun, 14 Jun 2026 15:22:41 +0000 (10:22 -0500)]
build: move library dependencies into mingw install
Dustin L. Howett [Mon, 1 Jun 2026 14:32:15 +0000 (10:32 -0400)]
build: use the setup-msys2 action rather than chocolatey
This will give us some ability in the future to vary `MSYSTEM` and
produce different MSYS builds.
Dustin L. Howett [Mon, 15 Jun 2026 20:25:35 +0000 (15:25 -0500)]
Merge pull request #3148 from XananasX7/ci/pin-actions
ci: pin acj/freebsd-firecracker-action to full commit SHA
Dustin L. Howett [Mon, 15 Jun 2026 20:24:06 +0000 (15:24 -0500)]
Merge pull request #3149 from DHowett/fix-mingw-tests
Dustin L. Howett [Sun, 14 Jun 2026 20:01:29 +0000 (15:01 -0500)]
tar: use filesystem-neutral replacement characters in the -s test
Dustin L. Howett [Sun, 14 Jun 2026 20:01:00 +0000 (15:01 -0500)]
test: promote the win32-repairing systemf wrapper to all systemf calls
XananasX7 [Sun, 14 Jun 2026 18:38:24 +0000 (18:38 +0000)]
ci: pin acj/freebsd-firecracker-action to full commit SHA
acj/freebsd-firecracker-action: @v0.9.1 -> @
bab3e77871573c7943b80816f1641b6c1ce36896
Dustin L. Howett [Sun, 14 Jun 2026 15:01:50 +0000 (10:01 -0500)]
Merge pull request #3143 from stoeckmann/7zip_size_int64
7zip: Avoid unnecessary int64_t size_t casts
Dustin L. Howett [Sun, 14 Jun 2026 14:59:01 +0000 (09:59 -0500)]
Merge pull request #3146 from stoeckmann/size_t_off
read_disk: Check if off_t can overflow size_t
Tobias Stoeckmann [Sun, 14 Jun 2026 09:14:03 +0000 (11:14 +0200)]
read_disk: Check if off_t can overflow size_t
Make sure that the content of the link can fit into a size_t. This
should be always true, but be cautious with 32 bit systems and very
weird filesystems (possibly through fuse).
I took SSIZE_MAX as upper limit due to signedness and eventual readlink
calls which would fail with larger values anyway.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Sat, 13 Jun 2026 09:01:42 +0000 (11:01 +0200)]
7zip: Avoid unnecessary int64_t size_t casts
Use size_t for avail_in, avail_out and stream_in for ppmd streams.
The fields avail_in and avail_out values are set in function decompress
based on size_t variables (t_avail_in/t_avail_out) and eventually
written back. The stream_in field is only incremented.
The actual use case happens within ppmd_read to support situations in
which not enough bytes are available. In such cases, more bytes are read
on demand but not written into next_in.
In such cases, avail_in can turn negative and next_in can point outside
of its allocated memory area.
Since stream_in is always incremented by one, it won't overflow on real
hardware, given that size_t would address the whole available heap
space.
Make sure that avail_in never turns negative (which allows the size_t
usage) and also guarantee that t_avail_in will never wrap around,
leading to a huge "used" value.
As a bonus, __archive_read_ahead can be reliably called with a NULL
argument now, since no more casting occurs for second argument, which
was missing in the test.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Sat, 13 Jun 2026 14:08:10 +0000 (16:08 +0200)]
cab: Properly limit maximum name length
The cab_read_ahead_remaining function might return more bytes through
avail than initially asked for. The given limit is 255+1, i.e. the
maximum file name length.
While it's not a big deal for libarchive to handle file names longer
than that, the CAB format does not allow longer names.
Limit the amount of available bytes to the given argument for proper
checking.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Sat, 13 Jun 2026 14:02:38 +0000 (16:02 +0200)]
cab: Improve truncation detection
If not enough bytes are available, __archive_read_ahead will return the
amount of bytes still available, which can be larger than 0. Only in
error cases, a negative value is returned.
Check the return pointer instead. It simplifies the error handling,
allows a NULL argument, and covers more truncation issues.
Right now, a NULL pointer with a non-zero size could be further
processed, which just asks for more technical or logical issues to
arise.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
data [Sat, 13 Jun 2026 00:12:52 +0000 (08:12 +0800)]
tar: avoid wide pathname conversion for trailing slash check
Avoid requesting the wide-character pathname when the tar reader only
needs to check whether a regular entry name ends in '/'.
archive_entry_pathname_w() can lazily convert the pathname to WCS. In the
common tar read path, the multibyte pathname is already available, so
checking it first avoids unnecessary per-entry conversion. The WCS fallback
is kept for cases where the multibyte pathname is unavailable.
Tobias Stoeckmann [Wed, 10 Jun 2026 18:09:24 +0000 (20:09 +0200)]
time: Use archive_integer.h
Use archive_integer's checked integer arithmetic.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Wed, 10 Jun 2026 18:08:33 +0000 (20:08 +0200)]
time: Sort header includes
While at it, add header checks.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Wed, 10 Jun 2026 18:06:40 +0000 (20:06 +0200)]
Use archive_integer.h for number parsers
Use checked integer arithmetic to detect integer overflows.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Wed, 10 Jun 2026 17:56:40 +0000 (19:56 +0200)]
Add archive_integer.h
The archive_integer.h header offers various integer operations to
libarchive, utilizing system functionality where possible.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Dustin L. Howett [Fri, 12 Jun 2026 18:17:58 +0000 (13:17 -0500)]
Merge pull request #3138 from datauwu/tar-ustar-pathname-fastpath
Tobias Stoeckmann [Fri, 12 Jun 2026 16:05:13 +0000 (18:05 +0200)]
Merge pull request #3140 from DHowett/dh/write-free-1
test: remove one new instance of assertEqualIntA(...free...)
Dustin L. Howett [Fri, 12 Jun 2026 15:30:13 +0000 (10:30 -0500)]
test: remove one new instance of assertEqualIntA(...free...)
Dustin L. Howett [Fri, 12 Jun 2026 15:28:45 +0000 (10:28 -0500)]
Merge pull request #2865 from GeorgH93/read_zipx_encryption
Add support for reading encrypted zipx formats (bzip2, lzma, ppmd, xz, zstd)
GeorgH93 [Wed, 10 Jun 2026 19:35:48 +0000 (21:35 +0200)]
Introduce zipx encryption handling for zstd compressed zip files
GeorgH93 [Wed, 10 Jun 2026 19:35:20 +0000 (21:35 +0200)]
Introduce zipx encryption handling for bzip2 compressed zip files
GeorgH93 [Wed, 10 Jun 2026 19:34:27 +0000 (21:34 +0200)]
Introduce zipx encryption handling for lzma compressed zip files
GeorgH93 [Wed, 10 Jun 2026 19:33:16 +0000 (21:33 +0200)]
Introduce zipx encryption handling for xz compressed zip files
GeorgH93 [Wed, 10 Jun 2026 19:31:46 +0000 (21:31 +0200)]
Introduce zipx encryption handling for ppmd compressed zip files
GeorgH93 [Wed, 10 Jun 2026 19:27:29 +0000 (21:27 +0200)]
Add test for creating encrypted zip file with libarchive and reading it again with libarchive
GeorgH93 [Wed, 10 Jun 2026 19:23:31 +0000 (21:23 +0200)]
Refactor zip archive reader, by moving decryption related code blocks into their own functions to make them reusable for compression formats other than deflate
data [Thu, 11 Jun 2026 19:36:33 +0000 (03:36 +0800)]
tar reader: avoid temporary buffer for empty-prefix ustar names
For empty-prefix ustar entries, copy the fixed-width name field
directly into the archive entry instead of first building a temporary
archive_string.
This avoids a temporary buffer allocation and intermediate copy in the
common case. It also fixes a small fatal-error leak by freeing the
temporary prefix/name buffer before returning on pathname conversion
failure.
Tobias Stoeckmann [Fri, 12 Jun 2026 06:27:25 +0000 (08:27 +0200)]
Merge pull request #2923 from bililateral/pr-7zip-numfiles-oom
7zip: sanity-check FilesInfo NumFiles before allocating entries
Dustin L. Howett [Fri, 12 Jun 2026 04:09:19 +0000 (23:09 -0500)]
Merge pull request #3105 from i1011/rar-unbounded-staticdata-fix
rar: Add missing bound check for staticdata
Dustin L. Howett [Fri, 12 Jun 2026 04:05:03 +0000 (23:05 -0500)]
Merge pull request #3137 from stoeckmann/typos_style
Fix minor non-functional issues
Dustin L. Howett [Thu, 11 Jun 2026 20:41:05 +0000 (15:41 -0500)]
Merge pull request #3136 from stoeckmann/counters
Remove unneeded counters
Tobias Stoeckmann [Thu, 11 Jun 2026 16:59:29 +0000 (18:59 +0200)]
cpio: Remove unneeded cast
The variable l is uint64_t, the return type is uint64_t. Do not cast to
int64_t.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Thu, 11 Jun 2026 16:59:18 +0000 (18:59 +0200)]
Fix whitespace issues
No functional change
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Thu, 11 Jun 2026 16:58:19 +0000 (18:58 +0200)]
Fix typos in comments and documentation
No functional change
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Thu, 11 Jun 2026 16:57:36 +0000 (18:57 +0200)]
filters: Remove unneeded counters
These counters are written to, but they are never read. Remove them for
easier code audits.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Thu, 11 Jun 2026 16:56:59 +0000 (18:56 +0200)]
formats: Remove unneeded counters
These counters are written to, but they are never read. Remove them for
easier code audits.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
i1011 [Thu, 11 Jun 2026 16:51:16 +0000 (00:51 +0800)]
rar: Reject staticdatalen larger than VM memory
Tobias Stoeckmann [Thu, 11 Jun 2026 15:41:31 +0000 (17:41 +0200)]
Merge commit from fork
unzip: reject absolute or traversing symlink targets
GeorgH93 [Wed, 10 Jun 2026 19:14:02 +0000 (21:14 +0200)]
Refactor the zip_winzip_aes_large test to support parameterized file ordering, file mode and compression type
bililateral [Wed, 18 Mar 2026 08:37:45 +0000 (16:37 +0800)]
7zip: sanity-check FilesInfo NumFiles before allocating entries
Dustin L. Howett [Wed, 10 Jun 2026 01:30:47 +0000 (20:30 -0500)]
Merge pull request #3048 from legnaleurc/fix/rar-reset-lz-table
rar: reset low-distance state for new LZ tables
Dustin L. Howett [Wed, 10 Jun 2026 01:26:31 +0000 (20:26 -0500)]
Merge pull request #3047 from legnaleurc/fix/rar-recovery-record
rar: skip NEWSUB payloads without size cap
Dustin L. Howett [Wed, 10 Jun 2026 01:14:28 +0000 (20:14 -0500)]
Merge pull request #3132 from stoeckmann/lz4_double_free
lz4: Fix double-free on reallocation failure
Alternative version of https://github.com/libarchive/libarchive/pull/2945 which removes the test (which requires a modified malloc to actually fail the 4 MB allocation).
Dustin L. Howett [Tue, 9 Jun 2026 22:00:55 +0000 (17:00 -0500)]
Merge pull request #3034 from datauwu/master
isomorph-cyber [Wed, 25 Mar 2026 03:19:10 +0000 (23:19 -0400)]
Fix double-free in LZ4 filter on reallocation failure (CWE-415)
lz4_allocate_out_block() frees state->out_block without NULLing
the pointer. If the subsequent malloc fails, the function returns
ARCHIVE_FATAL with a dangling pointer. lz4_filter_close() later
calls free(state->out_block) again, triggering a double-free.
Also, state->out_block_size was updated before checking if malloc
succeeded, leaving inconsistent metadata on failure.
Fix both lz4_allocate_out_block() and lz4_allocate_out_block_for_legacy():
- NULL the pointer immediately after free
- Move size update to after malloc succeeds
- Reset size to 0 on allocation failure
datauwu [Tue, 9 Jun 2026 19:10:27 +0000 (03:10 +0800)]
7zip: reject malformed SubStreamsInfo metadata
Validate the accumulated unpack stream count before allocating
per-substream metadata.
Reject folders that declare multiple substreams without kSize metadata,
since the parser needs those sizes to describe the stream layout.
Drop the explicit digest zeroing loop. The arrays are allocated with
calloc(), so the entries are already initialized.
datauwu [Tue, 9 Jun 2026 19:10:27 +0000 (03:10 +0800)]
7zip: add malformed SubStreamsInfo test
Add a 7z regression test for malformed SubStreamsInfo metadata that
declares more than one unpack stream without the kSize data needed to
describe those streams.
Store the archive as a .7z.uu file, matching the existing malformed
7z tests.
Dustin L. Howett [Tue, 9 Jun 2026 16:16:02 +0000 (11:16 -0500)]
unzip: reject absolute or traversing symlink targets
This is overly broad, and will reject some well-formed archives which
contain symlinks to trees which exist in the archive; however, this is
the best we can do without some rudimentary path parsing.
Fixes GHSA-q4gj-vh8c-67p8
Dustin L. Howett [Tue, 9 Jun 2026 14:55:46 +0000 (09:55 -0500)]
Merge pull request #2954 from ShelpAm/master
fix: zstd not found on Windows
Martin Matuška [Tue, 9 Jun 2026 06:40:07 +0000 (08:40 +0200)]
Merge pull request #2967 from bgilbert/deflate
Fix `test_write_filter_gzip` on Ubuntu s390x
Martin Matuška [Tue, 9 Jun 2026 06:35:23 +0000 (08:35 +0200)]
Merge pull request #3131 from stoeckmann/rpm_fsm
rpm: Refactor filter
Martin Matuška [Tue, 9 Jun 2026 06:31:24 +0000 (08:31 +0200)]
Merge pull request #3128 from stoeckmann/into_fd
Improve `archive_read_data_into_fd` with sparse files
Martin Matuška [Tue, 9 Jun 2026 06:30:03 +0000 (08:30 +0200)]
Merge pull request #3121 from stoeckmann/rar5_bytes_remaining
rar5: fix signed integer underflow in bytes_remaining
Martin Matuška [Tue, 9 Jun 2026 06:29:23 +0000 (08:29 +0200)]
Merge pull request #3120 from stoeckmann/archive_endian
Extend `archive_endian.h` usage
Martin Matuška [Tue, 9 Jun 2026 06:28:38 +0000 (08:28 +0200)]
Merge pull request #3098 from stoeckmann/filter_read_ahead
filters: Simplify `__archive_read_filter_ahead` use
Martin Matuška [Tue, 9 Jun 2026 06:27:58 +0000 (08:27 +0200)]
Merge pull request #3119 from stoeckmann/7zip_u32_oflow
7zip: Fix range check in get_pe_sfx_offset
Martin Matuška [Tue, 9 Jun 2026 06:26:54 +0000 (08:26 +0200)]
Merge pull request #3115 from stoeckmann/gzip_writer_mem
gzip: Fix OOB in writer with huge filename
Martin Matuška [Tue, 9 Jun 2026 06:25:51 +0000 (08:25 +0200)]
Merge pull request #3114 from stoeckmann/open_oob
Fix OOB in `archive_read_open_filenames_w` on some systems
Martin Matuška [Tue, 9 Jun 2026 06:25:10 +0000 (08:25 +0200)]
Merge pull request #3113 from stoeckmann/fflags_strcpy
7zip/rar5: Simplify file attribute handling
Martin Matuška [Tue, 9 Jun 2026 06:24:24 +0000 (08:24 +0200)]
Merge pull request #3108 from stoeckmann/windows_legacy
Reduce Windows legacy support
Dustin L. Howett [Tue, 9 Jun 2026 00:29:04 +0000 (19:29 -0500)]
Merge pull request #3116 from stoeckmann/hardening
This PR does not fix any reachable issue, but fixes the code in question nonetheless to prevent regressions in the future:
- Do not call `archive_copy_error` after `archive_read_free` to prevent a user after free bug
- Reset `vtable` to `NULL` to prevent `close` from being called after filter initialization error, since `data` is already freed and set to `NULL`, preventing a `NULL` pointer dereference
Dustin L. Howett [Tue, 9 Jun 2026 00:06:43 +0000 (19:06 -0500)]
Merge pull request #3021 from chnzzh/fix/iso9660-ce-loop
iso9660: fix infinite loop on self-referencing CE entry
Dustin L. Howett [Mon, 8 Jun 2026 20:39:07 +0000 (15:39 -0500)]
Merge pull request #3127 from shxz9u/fix-callback-data-realloc
Avoid updating allocation state before realloc succeeds
Dustin L. Howett [Mon, 8 Jun 2026 20:30:26 +0000 (15:30 -0500)]
Merge pull request #3126 from stoeckmann/shar
shar: Check `archive_entry_clone` result
Dustin L. Howett [Mon, 8 Jun 2026 20:29:48 +0000 (15:29 -0500)]
Merge pull request #3125 from stoeckmann/disk_clone
Check allocation in `_archive_write_disk_header`
Dustin L. Howett [Mon, 8 Jun 2026 20:28:01 +0000 (15:28 -0500)]
Merge pull request #3124 from stoeckmann/entry_mem
entry_link_resolver: Improve memory handling
Dustin L. Howett [Mon, 8 Jun 2026 20:27:04 +0000 (15:27 -0500)]
Merge pull request #3123 from stoeckmann/cab_remaining
cab: Simplify `cab_read_ahead_remaining`
Dustin L. Howett [Mon, 8 Jun 2026 20:26:25 +0000 (15:26 -0500)]
Merge pull request #3122 from stoeckmann/into_buffer
Remove `archive_read_data_into_buffer` comment
Dustin L. Howett [Mon, 8 Jun 2026 20:25:59 +0000 (15:25 -0500)]
Merge pull request #3117 from i1011/iso9660-null-deref-fix
iso9660: Fix null dereference in set_directory_record_rr
Tobias Stoeckmann [Wed, 3 Jun 2026 20:12:03 +0000 (22:12 +0200)]
open: Fix OOB in archive_read_open_filenames_w
If a system with sizeof(wchar_t)=2 (e.g. Cygwin) tries to convert a wide
character string into a multi byte string representation, it
precalculates the required length with sizeof(wchar_t) instead of
MB_LEN_MAX. This can lead to short memory allocation for filenames which
have a shorter representation in wchar_t than in UTF-8.
Resolves GHSA-crm5-q56g-xw29.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Wed, 3 Jun 2026 20:10:35 +0000 (22:10 +0200)]
open: Check OOB in archive_read_open_filenames_w
A system with sizeof(wchar_t)=2 (Cygwin on Windows) can trigger an out
of boundary write in archive_read_open_filenames_w when converting the
wide character string into a multi byte string.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>