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

xz vulnerability #99

Closed
jzarnett opened this issue Apr 3, 2024 · 4 comments
Closed

xz vulnerability #99

jzarnett opened this issue Apr 3, 2024 · 4 comments

Comments

@jzarnett
Copy link
Owner

jzarnett commented Apr 3, 2024

No description provided.

@patricklam
Copy link
Collaborator

@jzarnett
Copy link
Owner Author

jzarnett commented Apr 3, 2024

And yet I think it was discovered while performance profiling!

@patricklam
Copy link
Collaborator

patricklam commented Apr 4, 2024 via email

@h365chen
Copy link
Collaborator

Here's some context from the original thread

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

== Analyzing the injected code ==

I am not a security researcher, nor a reverse engineer. There's lots of
stuff I have not analyzed and most of what I observed is purely from
observation rather than exhaustively analyzing the backdoor code.

To analyze I primarily used "perf record -e intel_pt//ub" to observe where
execution diverges between the backdoor being active and not. Then also gdb,
setting breakpoints before the divergence.

The backdoor initially intercepts execution by replacing the ifunc resolvers
crc32_resolve(), crc64_resolve() with different code, which calls
_get_cpuid(), injected into the code (which previously would just be static
inline functions). In xz 5.6.1 the backdoor was further obfuscated, removing
symbol names.

These functions get resolved during startup, because sshd is built with
-Wl,-z,now, leading to all symbols being resolved early. If started with
LD_BIND_NOT=1 the backdoor does not appear to work.

...

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

3 participants