Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CVE-2024-3094] Backdoor in xz 5.6.0 and 5.6.1 #265

Closed
chenxiaolong opened this issue Mar 29, 2024 · 1 comment · Fixed by #276
Closed

[CVE-2024-3094] Backdoor in xz 5.6.0 and 5.6.1 #265

chenxiaolong opened this issue Mar 29, 2024 · 1 comment · Fixed by #276
Assignees

Comments

@chenxiaolong
Copy link
Owner

The discovery of a backdoor in versions 5.6.0 and 5.6.1 of xz was disclosed today:

xz is a very popular library for compressing data. avbroot uses xz to compress and decompress ramdisks and parts of an OTA's payload.bin.

If you use the prebuilt avbroot binaries distributed at https://github.com/chenxiaolong/avbroot/releases

NOT AFFECTED

The prebuilt binaries statically link the xz library. The Rust bindings for the xz library compile xz by directly running the C compiler on the *.c files. The backdoor involves a malicious build-to-host.m4 autotools build script as well as malicious .xz sample test files. Neither of these files are read by the Rust bindings' build process.

Additionally, the prebuilt avbroot binaries do not use an affected version of xz.

avbroot Rust bindings Bundled xz version
>= 3.1.0 liblzma-sys 0.2.5 5.4.6
>= 2.0.3 lzma-sys (my fork) 5.4.4
>= 2.0.0 lzma-sys 0.1.20 5.2.5

If you build avbroot yourself or are using the old Python version of avbroot

POTENTIALLY AFFECTED - I write "potentially" because the backdoor primarily targets sshd. I have not done a thorough analysis, but at first glance, it does not seem to exploit things in a way that would affect avbroot. Nevertheless, if the conditions below apply, make sure your system is patched!

In this scenario, avbroot is using the system xz libraries. The system xz library may contain the backdoor if:

  • You're running Linux on an x86_64 machine
  • Your distro uses deb or rpm packages
  • Your system xz version is 5.6.0 or 5.6.1

Check with your Linux distribution to determine how they are addressing this issue.

@chenxiaolong chenxiaolong self-assigned this Mar 29, 2024
@chenxiaolong chenxiaolong pinned this issue Mar 29, 2024
@pascallj
Copy link
Contributor

This has been a really interesting read this evening. Thanks for bringing it to my attention.

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 a pull request may close this issue.

2 participants