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

[liblzma] port uses compromised version #37839

Closed
marekr opened this issue Mar 29, 2024 · 6 comments · Fixed by #37841
Closed

[liblzma] port uses compromised version #37839

marekr opened this issue Mar 29, 2024 · 6 comments · Fixed by #37841
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@marekr
Copy link
Contributor

marekr commented Mar 29, 2024

Describe the bug
vcpkg updated liblzma to 5.6.0. This version is known as compromised and backdoored

https://nvd.nist.gov/vuln/detail/CVE-2024-3094
https://www.redhat.com/en/blog/urgent-security-alert-fedora-41-and-rawhide-users

This is a solid 10.0 CVE score vulnerability

vcpkg should immediately revert from 5.6.0

@WangWeiLin-MV WangWeiLin-MV added the category:port-bug The issue is with a library, which is something the port should already support label Mar 30, 2024
BillyONeal added a commit that referenced this issue Mar 30, 2024
Resolves #37839
Reverts #37199

See https://www.openwall.com/lists/oss-security/2024/03/29/4

Note that the version database is unmodified, only the baseline is
changed.

Because vcpkg builds liblzma from cmake sources downloaded from github
and this backdoor required modifications only present in the release
tarballs, it is our belief that vcpkg customers are not affected by this
problem. However, we are reverting this version out of an abundance of
caution as the threat actor clearly has broad access to liblzma
infrastructure, and because we believe customers will start flagging
this package by version as being a problem.
@MichaelCurrie
Copy link

MichaelCurrie commented Mar 30, 2024

This PR already addresses the issue by downgrading xz version, but it still leaves the build broken because the entire xz repo has been disabled by GitHub so ALL versions are blocked.

So, to fix your build, run git pull to sync that fix, and then make this unofficial one-liner change to grab xz from an unofficial mirror.

image

Then building will work again:

.\vcpkg install liblzma:x64-windows

@carsten-grimm
Copy link
Contributor

carsten-grimm commented Mar 30, 2024

This PR already addresses the issue by downgrading xz version, but it still leaves the build broken because the entire xz repo has been disabled by GitHub so ALL versions are blocked.

So, to fix your build, run git pull to sync that fix, and then make this unofficial one-liner change to grab xz from an unofficial mirror.

image

Then building will work again:

.\vcpkg install liblzma:x64-windows

If you are using vcpkg in manifest mode with a builtin baseline, you can use an overlay port to implement the suggestion by @MichaelCurrie .

@dg0yt
Copy link
Contributor

dg0yt commented Mar 30, 2024

to implement the suggestion by @MichaelCurrie

... until that fork is taken down for the same reasons as the official repo.

@carsten-grimm
Copy link
Contributor

to implement the suggestion by @MichaelCurrie

... until that fork is taken down for the same reasons as the official repo.

Yes. I am sure the folks involved do not make these decisions lightly. I hope there will be an actual solution soon.

@Neustradamus
Copy link

Neustradamus commented Mar 30, 2024

The official XZ team announcement is here:

Important to know: There is no problem with contributors here like @carsten-grimm.

But several people mix all because I have requested the XZ update in vcpkg.
I have received a lot of bad messages (private and public).
I have no link with XZ project, I follow only the project and do announcement or/and update requests.
I have requested 5.4.5 and 5.6.0 because there was only 5.4.4 in vcpkg.

@gowthamgts has participated on Reddit against me badly and I have commented on two places where he has commented (on my SCRAM request publications):

You can look here the original comment:

You can follow my announcements here:

The good point, people speak about SCRAM "Salted Challenge Response Authentication Mechanism" security ;)

Badly, some people or projects like only old unsecure mechanisms, some would like security improvements.

msp301 added a commit to msp301/pong that referenced this issue Mar 31, 2024
Make it easier to develop with SDL2 and Rust on Windows by getting
a build environment setup.

Previously attempted using 'cargo-vcpkg' but encountered build issues
due to vcpkg relying on liblzma port that has been taken down due to
being compromised: microsoft/vcpkg#37839
@WangWeiLin-MV WangWeiLin-MV changed the title liblzma port uses compromised version [liblzma] port uses compromised version Apr 1, 2024
carlopi added a commit to duckdb/duckdb-test-staging that referenced this issue Apr 1, 2024
GreenReaper added a commit to GreenReaper/drawpile.github.io that referenced this issue Apr 2, 2024
Without this drawpile-srv does not include WebSockets support.

Tested on Linux on Debian Bookworm x86 with bookworm-backports packages.

Tested on Windows 11 23H2 build 22631.3374:
* Temporarily required fox for xz repository unavailability: microsoft/vcpkg#37839 (comment)
* Reported listening for WebSocket connections but inbound connections were closed without response rather than registered as a connection unless headers Sec-WebSocket-Version: 13 and Sec-WebSocket-Key: ... were provided; even after that it didn't connect - this was because my nginx server had root directives:
# Don't pass request header and body to the server
# prevents referer being a problem
proxy_pass_request_headers off;
proxy_pass_request_body off;
# Don't pass the h2 upgrade header, as it breaks Safari
proxy_hide_header Upgrade;

Resolved by adding the following to the /drawpile-web/ws block:
proxy_pass_header Upgrade;
proxy_pass_request_headers on;
proxy_pass_request_body on;
carlopi added a commit to carlopi/duckdb that referenced this issue Apr 2, 2024
DragonJoker added a commit to DragonJoker/Castor3D that referenced this issue Apr 3, 2024
DragonJoker added a commit to DragonJoker/Castor3D that referenced this issue Apr 3, 2024
DragonJoker added a commit to DragonJoker/Castor3D that referenced this issue Apr 3, 2024
DragonJoker added a commit to DragonJoker/Castor3D that referenced this issue Apr 3, 2024
@blessio
Copy link

blessio commented Apr 3, 2024

This PR already addresses the issue by downgrading xz version, but it still leaves the build broken because the entire xz repo has been disabled by GitHub so ALL versions are blocked.

So, to fix your build, run git pull to sync that fix, and then make this unofficial one-liner change to grab xz from an unofficial mirror.

image

Then building will work again:

.\vcpkg install liblzma:x64-windows

You may have to not only reinstall the library as explained in the above (THANKS! @MichaelCurrie). But also:

  1. clean the vcpkg cache
    How do I safely clean vcpkg archives and disable it? #14157 ( on windows this is to delete C:\Users\AppData\Local\vcpkg\archives - on other platforms please search the internet )
  2. update the file portfile.cmake as explained above in all subfolders of VCPKG_ROOT\buildtrees\versioning_\versions\liblzma\

SchaichAlonso added a commit to PurpleFlowerGarden/vcpkg that referenced this issue Apr 3, 2024
https://github.com/tukaani-project/xz has been disabled.

Use bminor's fork of xz until the liblzma project publishes a new official
repository as proposed by @MichaelCurrie in a comment on microsoft#37839
WentsingNee pushed a commit to WentsingNee/vcpkg-merge-kerbal that referenced this issue Apr 4, 2024
https://github.com/tukaani-project/xz has been disabled.

Use bminor's fork of xz until the liblzma project publishes a new official
repository as proposed by @MichaelCurrie in a comment on microsoft#37839
urs-muff pushed a commit to merly-ai/vcpkg that referenced this issue Apr 4, 2024
https://github.com/tukaani-project/xz has been disabled.

Use bminor's fork of xz until the liblzma project publishes a new official
repository as proposed by @MichaelCurrie in a comment on microsoft#37839
WentsingNee pushed a commit to WentsingNee/vcpkg-merge-kerbal that referenced this issue Apr 6, 2024
https://github.com/tukaani-project/xz has been disabled.

Use bminor's fork of xz until the liblzma project publishes a new official
repository as proposed by @MichaelCurrie in a comment on microsoft#37839
Baklap4 added a commit to performous/performous that referenced this issue Apr 6, 2024
For reference please look here microsoft/vcpkg#37839

TL;DR Github disabled downloading their artifacts thus resulting in 404
askmeaboutlo0m added a commit to drawpile/drawpile.github.io that referenced this issue Apr 8, 2024
Because it's *still* busted in vcpkg. The workaround is from
microsoft/vcpkg#37839. Relates to #1 and drawpile/Drawpile#1239.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants