Skip to content

libarchive 3.8.8 (CVE-2026-14164) [stable/4.1]#453

Merged
laffer1 merged 4 commits into
stable/4.1from
libarchive-3.8.8-stable41
Jul 22, 2026
Merged

libarchive 3.8.8 (CVE-2026-14164) [stable/4.1]#453
laffer1 merged 4 commits into
stable/4.1from
libarchive-3.8.8-stable41

Conversation

@laffer1

@laffer1 laffer1 commented Jul 22, 2026

Copy link
Copy Markdown
Member

Backport of the libarchive 3.8.8 update (#451) to stable/4.1.

libarchive 3.8.8 fixes CVE-2026-14164, a high-severity double-free in the
RAR5 reader (archive_read_support_format_rar5.c) that could crash
applications parsing a crafted RAR5 archive (CVSS 7.5, network/DoS).

Changes

  • Subtree merge of vendor tag vendor/libarchive/dist/3.8.8 into
    contrib/libarchive.
  • Local iconv patch preserved (ICONV_SET_ILSEQ_INVALID extended to
    __MidnightBSD__ in archive_string.c).
  • Strict-build const fixes cherry-picked from master (5c3c324666):
    const-correct parse_option() in archive_options.c and the new
    Windows-attribute fflags[] mapping in the 7zip and RAR5 readers. No
    functional change.
  • UPDATING note added.

No build-glue (Makefile) changes needed: the new libarchive_fe/lafe_fnmatch.c
is compiled only when HAVE_FNMATCH is undefined, and MidnightBSD has native
fnmatch(3).

Testing

Targeted make buildenv build of lib/libarchive and
bsdtar/bsdcpio/bsdunzip/bsdcat on amd64 — all compile and link cleanly.

Relates to #450.

Security: CVE-2026-14164
AI-Assisted-by: Claude Opus 4.8

laffer1 and others added 4 commits July 22, 2026 00:26
Vendor import of libarchive 3.8.8, which fixes CVE-2026-14164, a
double-free in the RAR5 reader (archive_read_support_format_rar5.c)
that could crash applications parsing a crafted RAR5 archive.

Keep MidnightBSD's stripped file set (Windows-only sources, CMake,
autotools, and CI files) deleted, and preserve the local iconv patch in
archive_string.c that extends the ICONV_SET_ILSEQ_INVALID workaround to
__MidnightBSD__ as well as __FreeBSD__.

AI-Assisted-by: Claude Opus 4.8
Signed-off-by: Lucas Holt <luke@foolishgames.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
libarchive 3.8.8 de-constified parse_option() to char** and added new
Windows-attribute -> fflags mapping code in the 7zip and RAR5 readers
that assigns string literals to char* variables. Under MidnightBSD's
strict build flags (-Werror -Wwrite-strings -Wcast-qual) these discard
qualifiers and break buildworld.

Backport the upstream fixes verbatim (already on libarchive master, post
3.8.8): restore const on the option name/value pointers in
archive_options.c, and make the read-only fflags[] string pointers const
in archive_read_support_format_7zip.c and
archive_read_support_format_rar5.c. No functional change; the affected
strings are only ever read.

AI-Assisted-by: Claude Opus 4.8
Signed-off-by: Lucas Holt <luke@foolishgames.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit 5c3c324)
Signed-off-by: Lucas Holt <luke@foolishgames.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 22, 2026 13:01

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, we are unable to review this pull request

The GitHub API does not allow us to fetch diffs exceeding 300 files, and this pull request has 332

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@laffer1
laffer1 merged commit ab24061 into stable/4.1 Jul 22, 2026
3 of 4 checks passed
@laffer1
laffer1 deleted the libarchive-3.8.8-stable41 branch July 22, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants