-
Notifications
You must be signed in to change notification settings - Fork 209
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
BinExport wrongly identifies some functions as IMPORTED #90
Comments
Any updates on this? I'm running into the same issue. A function that's correctly disassembled by IDA is showing up as I'm working on an arm64 binary and, as far as I can tell, this happens when there is a |
@cblichmann Do you have any suggestions/ideas for fixing this? |
Oh wow, I should've noticed this much earlier. ./ida64 -OBinExportAlsoLogToStdErr:TRUE -OBinExportAutoAction:BinExportBinary ~/ntoskrnl-5012647.exe.i64 This resulted in (among others):
So in a sense this is working as intended. IDA itself also by default refuses to show the graph view for it (> 1000 basic blocks). This is exactly hitting the @Myles1: Can you check with a command-line similar to the above whether you also hit one of these limits? We should probably increase the limits somewhat and also set the function type to |
Why do we want to enforce the limits by hardcoding the values? |
Yes, we can definitely do that. It'd be awkward to use from a command-line and we'd also need to make this a BinDiff setting. I'll look into that. |
Otherwise these will be interpreted as imported, which is wrong and confusing (see issue #90). PiperOrigin-RevId: 551456988 Change-Id: Id645ef630c580b2b4c4db244bc1387598b5b3c07
Note: You can try this out with the artifacts that are now being built for each commit: https://github.com/google/binexport/actions/runs/5678688428 |
This happens very frequently in the binaries that I'm analyzing. Is there a workaround for keeping the excessively large cfg? I need to keep the cfg, no matter how large it might be. |
As a temporary workaround, you can increase the limits in flow_graph.h and recompile.
As an aside, IIRC, the Ghidra exporter extension has no hard-coded limits. |
I'm voting for the IDA command line option, leaving the current default values when not specified. It keeps it consistent with the other options already present (like |
Shouldn't we set the default to a large number and allow configuration for lowering it, as opposed to the other way around? That would make the defaults as sane as possible for new people. This issue took a while for me to track down and I hope others don't have to do the same. Edit: I'm also unable to recompile because I have IDA Home, not IDA Pro. Would it be possible to make a new release with updated values? |
@Myles1 I just submitted such a change for review. |
Machines have gotten faster and have lots more memory since these limits were introduced originally. A follow-up will make them configurable. See discussion in #90. PiperOrigin-RevId: 559098513 Change-Id: Ie19ae7dcc1d81e41f82c286ca5fd3dd791cecb0c
Consider the executable
ntoskrnl.exe
[1] (official version of ntoskrnl.exe)After exporting it with BinExport on IDA you will find that the function
FsRtlMdlReadCompleteDevEx
at address0x14032E010
is erroneously identified asIMPORTED
while in reality the function code is present in the binary (IDA shows it without problem).After looking a little bit into the sources it seems that the problem lies in this check:
It seems that BinExport doesn't extract the basic blocks for that particular function.
[1] Here you can find the executable as well with the pdb file associated
The text was updated successfully, but these errors were encountered: