-
Notifications
You must be signed in to change notification settings - Fork 163
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
goblin 0.0.18 fails to parse dynsyms #111
Comments
That binary has no defined dynamic symbols, and 7 undefined symbols. The hash table min_chain value is 1, which means that the defined dynamic symbols start at 1. That is, after the placeholder symbol at index 0. We could potentially change What we could do is find the maximum symbol index in the dyn/plt relocations if |
I'm confused; the binary appears to have several imported symbols, which the dynamic linker would have to resolve; not finding the symbols (or returning 0, when there are 7) in this case seems like a regression, yes? |
Yes, it's a regression, but the question is, how do you determine how many imported symbols there are? As you know, the binary does not include a length for the dynamic symbol table. AFAIK the dynamic linker accesses the imported symbols via the index in relocations, so if we want to find them then we need to do the same. |
@philipc ah got it, so isn't the algo then simply going to be, take the relocation array (which we have already), create a count of unique symbols it references, and then |
I would just like to marinate for a moment that all of this tomfoolery is because the elf spec omits a simple count field :] |
This logic is for leaking symbols from amd64 binaries, but it may help: https://github.com/endeav0r/skua/blob/54bbddc42bb16a3a05263e4d85607955c3c90e0a/lib/leak/elf/mod.rs#L204 There's a structure in there somewhere that has the number of symbols. |
ok that's good, that means we can compute the size without allocating a hashmap or something; can probably just just do |
@endeav0r ok new version 0.0.19 published, sorry about that :/ please let us know if you see anything else, hopefully this is resolved :) |
Thanks guys :) I'll give |
I am parsing a simple binary (I have uploaded the binary here: http://reversing.io/goblin/loop-0 ).
I recently updated to goblin 0.0.18, and noticed some symbols were not being parsed.
Elf.dynsyms.len()
returns a length of zero. I ran the binary throughbingrep
, and dynsyms were parsed fine, but then noticed I was onbingrep
0.5.0
. I upgradedbingrep
to the latest version, and now I get the following:I am troubleshooting through goblin, but thought I would share the issue now.
The text was updated successfully, but these errors were encountered: