libarchive 3.8.8 (CVE-2026-14164)#451
Conversation
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>
Signed-off-by: Lucas Holt <luke@foolishgames.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @laffer1's task in 1m 43s —— View job Claude's Task List
Review SummaryNo assembly or
7zip/RAR5 Core CVE fix — No correctness, malloc/free symmetry, bounds-checking, or security issues found in the reviewed hunks. The remainder of the vendor sync (filters, tar/zip/iso9660/cab/lha/xar readers, etc.) is upstream-authored and upstream-tested; a full line-by-line audit of all 43k changed lines is outside the scope of a targeted CVE-backport review, and Sourcery/Copilot both declined to review due to the 300+ file diff size. One minor observation (non-blocking): the vendor code uses upstream's own K&R-ish brace/spacing conventions rather than style(9) — this is expected and consistent with how |
Update libarchive from 3.8.7 to 3.8.8.
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 crashapplications parsing a crafted RAR5 archive (CVSS 7.5, network/DoS).
Changes
vendor/libarchive/dist(annotated tagvendor/libarchive/dist/3.8.8), merged intocontrib/libarchivevia subtreemerge.
ICONV_SET_ILSEQ_INVALIDextended to
__MidnightBSD__inarchive_string.c).(
-Werror -Wwrite-strings -Wcast-qual): const-correctparse_option()inarchive_options.c, and the new Windows-attributefflags[]mapping in the7zip and RAR5 readers. No functional change.
UPDATINGnote added.No build-glue (Makefile) changes were needed: the new
libarchive_fe/lafe_fnmatch.cis compiled only whenHAVE_FNMATCHisundefined, and MidnightBSD has native
fnmatch(3).Testing
Targeted
make buildenvbuild oflib/libarchiveandbsdtar/bsdcpio/bsdunzip/bsdcat— all compile and link cleanly onamd64. Ran a tar create/list/extract round-trip and a
bsdunzippatternextraction against the freshly built 3.8.8 library; the library reports
libarchive 3.8.8.Security: CVE-2026-14164
AI-Assisted-by: Claude Opus 4.8