fix shared obj lookup in getLibraryDependencies()#35
Open
thefossguy wants to merge 1 commit intoZouuup:mainfrom
Open
fix shared obj lookup in getLibraryDependencies()#35thefossguy wants to merge 1 commit intoZouuup:mainfrom
getLibraryDependencies()#35thefossguy wants to merge 1 commit intoZouuup:mainfrom
Conversation
Sometimes, the `ld-linux` shared object is presented as an absolute
path, instead of the shared object name and the path where that shared
object is found.
Something like this:
```
$ ldd /nix/store/s7cjsl5g5hdi4lfmb5qghghgni69ch1y-coreutils-full-9.7/bin/true
linux-vdso.so.1 (0x0000ffffb47fc000)
libcrypto.so.3 => /nix/store/ffdmy5fhjr6m1gkb8mycyf3swakvygd1-openssl-3.4.1/lib/libcrypto.so.3 (0x0000ffffb4240000)
libacl.so.1 => /nix/store/ccy32hi8wvjj1im3dbjld658rpvl226n-acl-2.3.2/lib/libacl.so.1 (0x0000ffffb4210000)
libattr.so.1 => /nix/store/3fqsrmsjdpfpy6dyxymbg6r01f9y39ln-attr-2.5.2/lib/libattr.so.1 (0x0000ffffb41e0000)
libgmp.so.10 => /nix/store/xmdlv9xmhyiqip377326ph94k1ipndz2-gmp-with-cxx-6.3.0/lib/libgmp.so.10 (0x0000ffffb4140000)
libc.so.6 => /nix/store/7kpxf47mzykkdn39lcnhj9z9ngpihamf-glibc-2.40-66/lib/libc.so.6 (0x0000ffffb3f60000)
/nix/store/7kpxf47mzykkdn39lcnhj9z9ngpihamf-glibc-2.40-66/lib/ld-linux-aarch64.so.1 (0x0000ffffb47c0000)
libdl.so.2 => /nix/store/7kpxf47mzykkdn39lcnhj9z9ngpihamf-glibc-2.40-66/lib/libdl.so.2 (0x0000ffffb3f30000)
libpthread.so.0 => /nix/store/7kpxf47mzykkdn39lcnhj9z9ngpihamf-glibc-2.40-66/lib/libpthread.so.0 (0x0000ffffb3f00000)
```
Here, because the line with `ld-linux-aarch64.so.1` does not have the
pattern `=>`, it gets excluded and the binary execution (with the
`--ldd` flag) fails due to a permissions error.
Author
|
Closes #21. |
Author
|
gentle ping |
Author
|
@Zouuup ping |
Owner
|
I think I prefer #38 for this, thoughts? |
Author
|
Wasn't aware of #38. Let me test it on my machines and I'll get back. |
Owner
|
@thefossguy are you happy with #38? should we close this one? |
Author
|
@Zouuup There's still another problem of only absolute SO paths being whitelisted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sometimes, the
ld-linuxshared object is presented as an absolute path, instead of the shared object name and the path where that shared object is found.Something like this:
Here, because the line with
ld-linux-aarch64.so.1does not have the pattern=>, it gets excluded and the binary execution (with the--lddflag) fails due to a permissions error.