This report was translated by AI; nobody has reviewed the translation yet. Original language: Slovak.
[TLP:CLEAR] xz/liblzma 5.6.0 and 5.6.1 contain a backdoor
a backdoor exploitable in combination with the OpenSSH SSH server is present in the official source code distribution packages of the xz compression tool, which includes the liblzma library, in versions 5.6.0 and 5.6.1. The versions are relatively new - 5.6.0 was released on 24.02.2024 [1] and 5.6.1 on 09.03.2024 [2] - so they are not yet very widespread. The affected distributions are Debian Sid (testing), which has already reverted to 5.4.5 as part of DSA 5649-1 [3], Fedora (40 and 41/Rawhide), where a fix and a warning have been issued [4], and further Arch, Gentoo, Slackware-current, NixOS testing, Alpine Edge and others - the most complete list so far is on the blog [5], including the information that the backdoor affects only AMD64 systems and requires the use of glibc (other implementations do not support indirect functions IFUNC [6]). A complete analysis was published by Andres Freund on the oss-security forum [7], where a discussion on the scope and impact subsequently started. The analysis [7] also contains the deobfuscated code and it follows from it that the backdoor uses stealth techniques and so currently only sshd binaries - the OpenSSH server - are affected, which, however, is not linked against liblzma by default, which e.g. Debian and Fedora change. The backdoor also checks for running in a terminal, in a debugger, or the use of LD_PRELOAD, in which cases it does not activate; details are in [7]. An issue was opened on the project's GitHub [8], where the intent of the authors is discussed - this is, however, now hard to dispute, e.g. version 5.6.1 [2] disguises the extension of the backdoor's functionality as a bug fix. Recommendation: Check the xz and liblzma version in use: $ xz --version If the version is 5.6.0 or 5.6.1, downgrade to an older version, e.g. the last stable 5.4.6 [9], and check the machine for infection. If an OpenSSH server exposed to the Internet is also running on the machine, consider the machine compromised.
An obfuscated backdoor in the official xz packages which, during compilation, modifies the behavior of the liblzma library with respect to the applications that use it [10]. Impact: Malicious code execution affecting overall confidentiality, integrity, and availability of the system Recommendations: Check the xz and liblzma version in use: $ xz --version If the version is 5.6.0 or 5.6.1, downgrade to an older version, e.g. the last stable 5.4.6 [9], and check the machine for infection. If an OpenSSH server exposed to the Internet is also running on the machine, consider the machine compromised.
The vulnerability is present in products:
- xz;>=5.6.0
- liblzma;>=5.6.0
CVSS: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
More information:
- CVE-2024-3094 at cve.org, NVD
- CWE-506 at cwe.mitre.org
The vulnerability was publicly disclosed 29. 3. 2024.
Links
- [1] https://github.com/tukaani-project/xz/releases/tag/v5.6.0
- [2] https://github.com/tukaani-project/xz/releases/tag/v5.6.1
- [3] https://lists.debian.org/debian-security-announce/2024/msg00057.html
- [4] https://www.redhat.com/en/blog/urgent-security-alert-fedora-41-and-rawhide-users
- [5] https://xeiaso.net/notes/2024/xz-vuln/
- [6] https://sourceware.org/glibc/wiki/GNU_IFUNC
- [7] https://www.openwall.com/lists/oss-security/2024/03/29/4
- [8] https://github.com/tukaani-project/xz/issues/92
- [9] https://github.com/tukaani-project/xz/releases/tag/v5.4.6
- [10] https://nvd.nist.gov/vuln/detail/CVE-2024-3094
CESNET, z.s.p.o. on 29. 3. 2024.