-
Notifications
You must be signed in to change notification settings - Fork 282
mips disasm losing xrefs to offsets from $gp #4839
Copy link
Copy link
Closed
Labels
Arch: MIPSIssues with the MIPS architecture pluginIssues with the MIPS architecture pluginComponent: ArchitectureIssue needs changes to an architecture pluginIssue needs changes to an architecture pluginEffort: MediumIssues require < 1 month of workIssues require < 1 month of workImpact: HighIssue adds or blocks important functionalityIssue adds or blocks important functionality
Milestone
Metadata
Metadata
Assignees
Labels
Arch: MIPSIssues with the MIPS architecture pluginIssues with the MIPS architecture pluginComponent: ArchitectureIssue needs changes to an architecture pluginIssue needs changes to an architecture pluginEffort: MediumIssues require < 1 month of workIssues require < 1 month of workImpact: HighIssue adds or blocks important functionalityIssue adds or blocks important functionality
Version and Platform (required):
Bug Description:
It appears that the disassembler is losing track of xrefs based on offsets from
$gpwhen the value in$gpis saved to the stack and later loaded back from the stack. This worked correctly in 3.4.4271 but no longer functions as expected in both 3.5.4526 (latest stable) and 3.6.4728 (latest dev).It's of note that In opening other mips binaries in 3.5/3.6, when
$gpis not manipulated in the function prologue (like it is here in the example program), binja continues to find and label xrefs as I've come to expect. It seems like this condition only appears when$gpgets a new value loaded from the stack (even if that value is the canonical $gp addr).Steps To Reproduce:
http_parser_main.fputs,fflushand others are identified correctly.httpd.zip
Expected Behavior:
When the analysis is complete, we should see xrefs to the referenced libc functions.
Screenshots:
Example of binja mapping the calls to
fflushandfputsfromhttp_parser_mainin 3.4.Example of binja failing to find and label these cross references in 3.5 and 3.6. Note how it's happy to label the xref for memset but then loses track after
$gpgets a value from the stack.3.5
3.6