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

uClibc issues #1

Open
smx-smx opened this issue Jun 3, 2020 · 1 comment
Open

uClibc issues #1

smx-smx opened this issue Jun 3, 2020 · 1 comment

Comments

@smx-smx
Copy link
Owner

smx-smx commented Jun 3, 2020

On uClibc, we must load libdl.so ourselves by using parts from ldso

The code that does so is an adaptation of the code from the uClibc source code, but it's a trimmed down version that does the bare minimum to get libdl.so loaded

This has several implications:

  • .init/.fini aren't handled, and you will see the following warning on screen
    symbol 'dl_cleanup': can't resolve symbol
  • symbol scope handling
    later versions of uClibc introduced a symbol scope for loaded shared libraries.
    the problem with this is that the offset of symbol_scope is not fixed (depends on how uClibc was compiled, see https://github.com/kraj/uClibc/blob/ca1c74d67dd115d059a875150e10b8560a9c35a8/ldso/include/dl-hash.h#L82)
  • we need to avoid loading libdl twice
  • detect the uClibc version (don't assume MIPS == "old" uClibc). old uClibc doesn't use symbol scopes (making it ironically easier for us)

This ultimately results in the inability to run the injection code more than once on uClibc

@smx-smx
Copy link
Owner Author

smx-smx commented Nov 30, 2021

Added symbol scope detection heuristic in 9e77ceb, to be improved

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

1 participant