-
Notifications
You must be signed in to change notification settings - Fork 158
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
PE: ImportLookupTableEntry::parse() panics #28
Comments
@willglynn awesome thanks for providing what you could, will make much easier ! I'm not in front of a puter right now but I will look into this asap, pretty sure it was a case of me unwrapping when I shouldn't have, the PE backend, is alas, slightly less filled with love than Mach or ELF. Also, I assume from the repro this is coming from goblin master? I don't know the commit offhand but if it's from a few days ago I just merged a huge change so could be related to that. Anyyyyywayy thanks for the repro! |
Great, thanks! 👍 That commit is indeed latest I did notice that typical values for (If you want to know about PDB files, on the other hand…) |
@willglynn I believe this resolves it at least in the case of curl, though why the binary has that bad RVA is a bit mysterious; i wonder what the kernel is doing when it hits that RVA 🤔 At first I thought it wasn't bad, but I was doing ordinals wrong (since the RVA was small ( |
Yep! |
For reference, this was actually a bug with parsing PE32+ imports, which was later fixed by #82. |
I'm getting panics on this line while trying to parse a particular executable. Unfortunately, this executable is proprietary so I can't share it, and I don't know enough about the PE format to understand what's going on here.
I did however write a script to run through the PE executables on my machine, which found that a random GDAL distribution I had laying around includes a
curl.exe
that causes the exact same panic.curl
is something I can share, so steps to reproduce are:Come to think of it, I bet my original executable statically links
libcurl
, so even though these executables are from totally different environments, that might be a common thread.The text was updated successfully, but these errors were encountered: