-
Notifications
You must be signed in to change notification settings - Fork 514
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
Only use os- and processor- specific enum values on the appropriate os and processor #175
Comments
Specifically, pyelftools already reads the Could you provide a minimal test file where this problem can be observed? |
Here is a test file. It was provided to me by one of my users and I have no idea how to make it smaller, but the nature of the problem is evident. from elftools.elf import elffile
e = elffile.ELFFile(open('/home/audrey/Downloads/libLLVM.so', 'rb'))
dyn = e.get_section_by_name('.dynamic')
soname = [ x.soname for x in list(dyn.iter_tags()) if x.entry.d_tag == 'DT_SONAME']
print soname I've looked over the commits you linked and yes, it's now basically within reach to do the same thing. The problem is... I don't know what sort of values of |
Found the relevant code in readelf. https://chromium.googlesource.com/native_client/nacl-binutils/+/upstream/master/binutils/readelf.c#1986 Pull request incoming. |
So this is the actual cause that was behind yesterday's issue, though that is probably still a problem.
If you look at how this project tries to load the file linked from this issue angr/cle#103 (comment) it crashes because it thinks the dynamic tag 0x6000000f is
DT_SUNW_FILTER
, and assumes that the corresponding d_val points to a string. However, this is not solaris, and 0x6000000f is not a filter here, so the pointer is not an index into a string table, and so the lookup crashes.This seems like a very complicated and invasive change, and I don't know anything about the architecture of this project, so I'd appreciate a response other than "patches welcome".
The text was updated successfully, but these errors were encountered: