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

[Urgent security issue] [liblzma] port uses compromised version #4538

Closed
jonathanlinat opened this issue Apr 1, 2024 · 16 comments
Closed

[Urgent security issue] [liblzma] port uses compromised version #4538

jonathanlinat opened this issue Apr 1, 2024 · 16 comments

Comments

@jonathanlinat
Copy link
Contributor

jonathanlinat commented Apr 1, 2024

@kduske My automated process to build the apps and tools for my Quake Level Design Starter Kit fails for TrenchBroom on Windows.

It happens because of a compromised vcpkg dependency, which is related to a GitHub account that has been terminated. The main reason is the presence of a backdoor.

This will likely happen on your automated pipeline, too.

Here is a possible temporary workaround: microsoft/vcpkg#37839 (comment)


image

image

image

image

@jonathanlinat jonathanlinat changed the title [Security issue] [liblzma] port uses compromised version [Urgent Security issue] [liblzma] port uses compromised version Apr 1, 2024
@jonathanlinat jonathanlinat changed the title [Urgent Security issue] [liblzma] port uses compromised version [Urgent security issue] [liblzma] port uses compromised version Apr 1, 2024
@kduske
Copy link
Collaborator

kduske commented Apr 1, 2024

Thanks! I'll look into updating the dependency. Hopefully there will be a proper fix by then. As far as I understand it, the actual issue only affects glibc based systems, ie. Linux. I'm not sure if TB using this library actually makes the host vulnerable if it wasn't already, but I don't think so.

@dsvensson
Copy link

dsvensson commented Apr 6, 2024

If it comes via freeimage -> tiff -> lzma it's unfortunately not a feature that can be disabled. The freeimage port could be vendored and customized though, haven't followed the other dependencies to see if it comes from more places.

@dsvensson
Copy link

Fix for the freeimage port on the way, microsoft/vcpkg#38047

@kduske
Copy link
Collaborator

kduske commented Apr 9, 2024

This fix disables tiff support?

@eGax
Copy link
Contributor

eGax commented Apr 9, 2024

I'm not sure either if it is disabling features of tiff or the format all together. I asked on that pull request, waiting for an answer.

@eGax
Copy link
Contributor

eGax commented Apr 9, 2024

Apparently it does not disable, just fix. Here is a link to the reply.
microsoft/vcpkg#38047 (comment)

@kduske
Copy link
Collaborator

kduske commented Apr 9, 2024

I don't understand the reply I'm afraid.

@eGax
Copy link
Contributor

eGax commented Apr 9, 2024

Ha, me either, that's why I linked the reply.

@jonathanlinat
Copy link
Contributor Author

jonathanlinat commented Apr 12, 2024

Some news.

image

That means, in theory, the building process of TrenchBroom should work now. Let's try.

Here is the commit responsible for removing the backdoor from the official GitHub repository: tukaani-project/xz@e93e13c

@jonathanlinat
Copy link
Contributor Author

jonathanlinat commented Apr 12, 2024

Well... it does not work, unfortunately. But now, the issue is related to the freeimage library.

image

Ref.: https://github.com/jonathanlinat/quake-leveldesign-starterkit/actions/runs/8592605129/job/23758309982#step:11:789

@dsvensson
Copy link

dsvensson commented Apr 12, 2024

microsoft/vcpkg#38047 is merged now, so should be possible to just bump vcpkg and tiff no longer depends on lzma.

But as the release artifacts have been restored for xz, doing nothing works fine too.

Yep, verified. Can close this issue now unless you want to tighten up the dependencies a bit. Compiles with no change.

@jonathanlinat
Copy link
Contributor Author

I can confirm that the xz issue is gone. Now, we are facing another one related to freeimage. I'll close this ticket in the meantime. Thank you all for your participation.

image

@dsvensson
Copy link

Not seeing that issue with upstream TrenchBroom. Builds and runs fine on Windows here via vcpkg.

@jonathanlinat
Copy link
Contributor Author

jonathanlinat commented Apr 12, 2024

I can confirm that the xz issue is gone. Now, we are facing another one related to freeimage. I'll close this ticket in the meantime. Thank you all for your participation.

image

@kduske Is this what we need to upgrade?

https://github.com/TrenchBroom/TrenchBroom/blob/master/vcpkg-overlay-ports/freeimage/vcpkg.json

@neogeographica
Copy link
Contributor

Ha, me either, that's why I linked the reply.

I think it enables you to specifically declare which freeimage features you are using, so that e.g. you can avoid pulling in lzma if you aren't using it. Motivated by the (temporary? previous?) broken state of things due to xz being pulled offline.

If xz is back now (without the vulnerability) then maybe this is not something that TB needs to worry with? I'm not up to speed though about whether all the necessary fixes/changes have propagated everywhere yet.

@eGax
Copy link
Contributor

eGax commented Apr 13, 2024

Thanks Joel.

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

No branches or pull requests

5 participants