-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-25:07.libarchive Security Advisory The FreeBSD Project Topic: Integer overflow in libarchive leading to double free Category: contrib Module: libarchive Announced: 2025-08-08 Affects: All supported versions of FreeBSD. Corrected: 2025-06-19 22:47:34 UTC (stable/14, 14.3-STABLE) 2025-08-08 00:39:05 UTC (releng/14.3, 14.3-RELEASE-p2) 2025-08-08 00:39:19 UTC (releng/14.2, 14.2-RELEASE-p5) 2025-06-20 20:43:32 UTC (stable/13, 13.5-STABLE) 2025-08-08 00:39:29 UTC (releng/13.5, 13.5-RELEASE-p3) CVE Name: CVE-2025-5914 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background The libarchive(3) library provides a flexible interface for reading and writing streaming archive files such as tar(1) and cpio(1), and has been the basis for the FreeBSD implementation of the tar(1) and cpio(1) utilities since FreeBSD 5.3. II. Problem Description An integer overflow in the archive_read_format_rar_seek_data() function may lead to a double free problem. III. Impact Exploiting a double free vulnerability can cause memory corruption. This in turn could enable a threat actor to execute arbitrary code. It might also result in denial of service. IV. Workaround No workaround is available. V. Solution Upgrade your vulnerable system to a supported FreeBSD stable or release / security branch (releng) dated after the correction date. Perform one of the following: 1) To update your vulnerable system via a binary patch: Systems running a RELEASE version of FreeBSD on the amd64 or arm64 platforms, or the i386 platform on FreeBSD 13, can be updated via the freebsd-update(8) utility: # freebsd-update fetch # freebsd-update install 2) To update your vulnerable system via a source code patch: The following patches have been verified to apply to the applicable FreeBSD release branches. a) Download the relevant patch from the location below, and verify the detached PGP signature using your PGP utility. # fetch https://security.FreeBSD.org/patches/SA-25:07/libarchive.patch # fetch https://security.FreeBSD.org/patches/SA-25:07/libarchive.patch.asc # gpg --verify libarchive.patch.asc b) Apply the patch. Execute the following commands as root: # cd /usr/src # patch < /path/to/patch c) Recompile the operating system using buildworld and installworld as described in . Restart all daemons that use the library, or reboot the system. VI. Correction details This issue is corrected as of the corresponding Git commit hash in the following stable and release branches: Branch/path Hash Revision - ------------------------------------------------------------------------- stable/14/ 6dad4525a291 stable/14-n271728 releng/14.3/ fb780a82dfbd releng/14.3-n271438 releng/14.2/ c0979bd2734f releng/14.2-n269532 stable/13/ f47afeb2ce1e stable/13-n259312 releng/13.5/ 798b7b161a71 releng/13.5-n259173 - ------------------------------------------------------------------------- Run the following command to see which files were modified by a particular commit: # git show --stat Or visit the following URL, replacing NNNNNN with the hash: To determine the commit count in a working tree (for comparison against nNNNNNN in the table above), run: # git rev-list --count --first-parent HEAD VII. References The latest revision of this advisory is available at -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEthUnfoEIffdcgYM7bljekB8AGu8FAmiVSiEACgkQbljekB8A Gu9QGg/9Gri16tBoEsU57UcI3MlbHYGHSXb3Bqs+EgAfxeLjSB58GH1zDUjgjVmT js6QN6scVbyX4SHQyM4nBw1zn5D7Ejhr/1nrnkbr98YWJn6OZzadp9ANNO2joclx QBD6Gztk9bCPMPtSyMCTe7yOtvcYWoNzHQfaIU+xdfRmlRFNv/VzaUL/vfGdTF1a +yJ0BEB0oNLlRpCFayDXpFquxe72Uwc2qaYKd5cuEHNrXoo54KZC7fSH1lJR5ZiH puPz/mxp3sY/zdWwNvmuFxZTuAIgfLiovV1Hr/UbzyoOfhqtZUuPuXkSS1JQAfuo 9lSd71E8ZB11MSUZ23kfUMO8KMAgt+d47UGHC2v/uU2t9CcSpc7IpO7khZpRGisE DjwQ0XgMu5Csa7YBB++tulOsESlNqlcVaredBqRaT8h7ClTQ4pNguhkJy+mRm0m1 3nRYKoG7xejJIArrg+aTu5HboAPGINwbX1m2dOIhI/P6hKCMxoZm4P5ubgxDIXIM Ofv19plmhEVACSPb+uzEvIke82R51aGyCnVAjORL6fNX5SkZoLZb5VDJTr5F3BdL 90ZOgWpKCwD6r7K65unDA7BuHz/VntNNR0QdxO3+fJk/Bmqo8mykAAU5LO0JmWUw H4mgUonPalkZag2pYFJpixqV/BPa9tad2xXRfKiFzsRsawfzrJA= =fwMp -----END PGP SIGNATURE-----