From nobody Wed Jul 2 22:27:33 2025 X-Original-To: freebsd-security@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bXZK22HrFz611ym for ; Wed, 02 Jul 2025 22:27:34 +0000 (UTC) (envelope-from security-advisories@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bXZK16Kjfz3MVt; Wed, 02 Jul 2025 22:27:33 +0000 (UTC) (envelope-from security-advisories@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751495253; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=vzTErx4234CUX/iw/7m8ax4dV06ULrnGBJ+sT5vgX9c=; b=CNlzUohnnCvSZGcgFMYLe7nZgZu/PNUtpwf5A0yGwTAbEuKgOT8f7sddHvIGl0NsAJslN7 CO0DB/x03bXjVUszOA6q4NXAn0r0lOCmwxf4mbekpJ4oeSkq062tl4GhlRPYUNutaYBcG1 bWiZTnbb84qpbSpey1jaEiqgVBpz08HETF2byWd939Wdk0mEix+bfQA5CMborPPVXMp0Ge db9Uzgw34GwV2YpMAVRp2E50eyVtVOwKvjjpZJH22VCXImjheB7G/4nerPSWXagsaof5Mn KHYAA1VQ/mL18R/7yx9EbADXZjzdOrYGHKmUx8C1gjluefdEmXEe8OYGztQFCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751495253; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=vzTErx4234CUX/iw/7m8ax4dV06ULrnGBJ+sT5vgX9c=; b=FKSnEZliekKCKx7NYJrttO9gd5cHFlCs/q7M6MruethgK8MWu512dAlMv1453Thv3Zhirb 6IxGa8Xup8BQ1NWPOV4fFr7nabvb//sqI2wl/6R+U4C4CuY4TzDfhYAWQ9HJdTFruH8Z1s PTS/abPQig3IA0XUxqJCgscWxrdFzXh8C/LQhD2NaN7CLuzBf7W1wvVDTcN7pnvV0JI1AV 8M6XPVOiIVpCtXEaz4wdx0jCt/rw9u0l68w5L+3yHOD6kZnkZAjGZOGU03Tl5XTVrd9GnI i7+PpwiuwI9AbF0cxfOsGVq2semk1avxb2+TeUun950YrJ9BD4TujGy16spm2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1751495253; a=rsa-sha256; cv=none; b=Yqo1lcrWnbzmwFzYZjvxMdxQ+pGClR5w21ljyMVnw+xu+jRbcXdcnVw81AJYJJy61umHy9 tzzNcYpIFMkBHW2f6lUYQZm9Afu8BXksWrOBck5PyqCaUzqCRpFC1AofyMq06dbo1t01gD /+a6jr+V3g8eF/SEUuASRMoiZ3kvniCsglUYJv3zaDPq9FmBltyT9uuER7LG2Zc4VUyiqL YZXjX6oJ/dPRqaNefOzMTCLxrmyng1UZfvpHOkt+Hx1cSr59wx8Z9sOqAMalmdG/+Pqbzu fbRHiggCVa5GBlQPTouR7q8bx7cCisGO0CrvIk594qli2egF5werlQQCkSRpKA== Received: by freefall.freebsd.org (Postfix, from userid 945) id AD32511118; Wed, 02 Jul 2025 22:27:33 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-25:06.xz Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20250702222733.AD32511118@freefall.freebsd.org> Date: Wed, 02 Jul 2025 22:27:33 +0000 (UTC) List-Id: Security issues List-Archive: https://lists.freebsd.org/archives/freebsd-security List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-security@freebsd.org Sender: owner-freebsd-security@FreeBSD.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-25:06.xz Security Advisory The FreeBSD Project Topic: Use-after-free in multi-threaded xz decoder Category: contrib Module: xz Announced: 2025-07-02 Affects: FreeBSD 13.5 and FreeBSD 14.2 Corrected: 2025-05-07 21:26:00 UTC (stable/14, 14.2-STABLE) 2025-07-02 18:28:13 UTC (releng/14.2, 14.2-RELEASE-p4) 2025-05-07 21:25:59 UTC (stable/13, 13.4-STABLE) 2025-07-02 18:28:32 UTC (releng/13.5, 13.5-RELEASE-p2) CVE Name: CVE-2025-31115 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background XZ Utils is a set of free software command-line lossless data compressors, including the programs lzma and xz. II. Problem Description A worker thread could free its input buffer after decoding, while the main thread might still be writing to it. This leads to an use-after-free condition on heap memory. III. Impact An attacker may use specifically crafted .xz file to cause multi-threaded xz decoder to crash, or potentially run arbitrary code under the credential the decoder was executed. IV. Workaround No workaround is available, but systems where xz decoding was not used in multi-threaded mode are not affected. V. Solution Upgrade your vulnerable system to a supported FreeBSD stable or release / security branch (releng) dated after the correction date. Unless the decoder is running as a daemon, no reboot is required. 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 # shutdown -r +10min "Rebooting for a security update" 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:06/xz.patch # fetch https://security.FreeBSD.org/patches/SA-25:06/xz.patch.asc # gpg --verify xz.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 liblzma 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/ 5cf27a49a2de stable/14-n271423 releng/14.2/ 49b07b94662b releng/14.2-n269529 stable/13/ 346bb5d3fe19 stable/13-n259281 releng/13.5/ 95e9c54b3961 releng/13.5-n259171 - ------------------------------------------------------------------------- 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----- iQIzBAEBCgAdFiEEthUnfoEIffdcgYM7bljekB8AGu8FAmhlfTUACgkQbljekB8A Gu/LnA//WD66vLyMS5V+GcwJO3+Txq502F7U/HRoq0TRNJoEkSL5u+tpJD/hZUn4 tkBayhSdJKs6d6UURZdhlEsCF4V7bjMzmudOwUnEwFZNXoUZHe0DHPMzFpGvVrD/ zlN2QZptcP5IU0mPlSFbhQzrUwLnKhjN0NqDZSdaM+7jWDN2zdQFTwijHLFZV66a FYK8Gr+x4OJHn2CtxBz2ST2S4Aaju38D02IdwX/MQFTtVpLHvt2w/j84Ks2c/MXp BJxHKcyohEZRd0jO2XKaX1gBANoLNSRcJbeamJ8zYXSygakbqTkgfW8QHi09WSJH cLqp/NNi4D5v83j11vKlMHAujLgvgTupF7KTG5FXVYF0KZ0URXGEprC9mCWPbIOo 5AD1pbDW1G/OO/cmBn63nILu0U5YLqjcIh2UkJxROs8BBCWouh3k6ZEx2mxQZ9Jy U2aDrC8TwYf1Sqwr063L+WNo38SUSILNaP17xWpeDToDMYHqnrdMOtj/OFDV1g1U ra0CYfp2yWpMZ9UibS6GV+mvtiPe/exxqMNFmkpZ/+uTBbH3vPX/rVbJIJkIsOsA Re9OUfhOYTsPV/bK+NRPAqaLTrmifEECYlskmAgvGoVdMldeL47nGt0EyZLKZ75y xY4qPHPJEv7TXA8ZOpQ85M491TfwoETZ6CytmwjeXQmOEY8KRtQ= =TZId -----END PGP SIGNATURE-----