Skip to content
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

Low-level Error: Overlapping input varnodes #5918

Open
int3rsys opened this issue Oct 28, 2023 · 3 comments
Open

Low-level Error: Overlapping input varnodes #5918

int3rsys opened this issue Oct 28, 2023 · 3 comments
Assignees
Labels
Feature: Decompiler Status: Triage Information is being gathered

Comments

@int3rsys
Copy link

int3rsys commented Oct 28, 2023

Describe the bug
Ghidra is unable to decompile a certain function, part of a x64 elf binary.

Environment (please complete the following information):

  • OS: Ubuntu 22.04.3
  • Java Version:
  • [openjdk 17.0.8.1 [2023-08-24]
    OpenJDK Runtime Environment (build 17.0.8.1+1-Ubuntu-0ubuntu122.04)
    OpenJDK 64-Bit Server VM (build 17.0.8.1+1-Ubuntu-0ubuntu122.04, mixed mode, sharing)
  • Ghidra Version: 10.3.2

To reproduce:
decompile attached binary: zabbix_agentd.zip
goto function zbx_tcp_recv_ext

EDIT:
the debug xml file:
zbx_tcp_Recv_ext.zip

@LukeSerne
Copy link
Contributor

I cannot reproduce this in Ghidra 10.4. It is possible that this error is caused by the types of the parameters of the function. Since the default has no parameters by default, Ghidra will guess the types, and the guessed types do not cause this error.

It would be helpful if you could share the debug xml for this function. To generate this file, go to the function that causes the error, click the downwards pointing arrow (as indicated in the screenshot below) for a dropdown menu to appear, and click "Debug Function Decompilation" in that menu. Then choose a location to store the xml, and an xml will be created there that allows others to easily reproduce the same decompiler input. If you could share this xml, that'd help a lot in diagnosing and solving this issue.

image

@int3rsys
Copy link
Author

I cannot reproduce this in Ghidra 10.4. It is possible that this error is caused by the types of the parameters of the function. Since the default has no parameters by default, Ghidra will guess the types, and the guessed types do not cause this error.

It would be helpful if you could share the debug xml for this function. To generate this file, go to the function that causes the error, click the downwards pointing arrow (as indicated in the screenshot below) for a dropdown menu to appear, and click "Debug Function Decompilation" in that menu. Then choose a location to store the xml, and an xml will be created there that allows others to easily reproduce the same decompiler input. If you could share this xml, that'd help a lot in diagnosing and solving this issue.

image

Sure thing, thanks!
zbx_tcp_Recv_ext.zip

I attached the file to this message and also in the main question

@LukeSerne
Copy link
Contributor

The two varnodes that overlap are XMM1_Qa and XMM1. I'm not sure why these are both detected as inputs. If I lock the existing function prototype before decompiling, there is no error, and the function decompiles successfully. As a workaround, you can try changing the prototype of the function to long zbx_tcp_recv_ext(long, int, byte) - that might help.

I wonder why Ghidra attempts to mark both XMM1 and XMM1_Qa as input and why I can't seem to trigger it in Ghidra 10.4. Perhaps someone more familiar with the internals of the decompiler can help clear that up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Decompiler Status: Triage Information is being gathered
Projects
None yet
Development

No branches or pull requests

4 participants