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

operation result dereferenced by memory address #134

Open
yangzao opened this issue Apr 19, 2024 · 0 comments
Open

operation result dereferenced by memory address #134

yangzao opened this issue Apr 19, 2024 · 0 comments

Comments

@yangzao
Copy link

yangzao commented Apr 19, 2024

Environment

Thu Apr 18 08:13:12 PM MDT 2024
radare2 5.8.9 31711 @ linux-x86-64
birth: git.5.8.8-1074-gbe75b2d9ee 2024-02-13__17:26:56
commit: be75b2d9ee0701582aae047c2a717c4a64d6503e
options: gpl -O1 cs:5 cl:2 make
Linux x86_64

Description

R2ghidra does not recover the value after some operations, instead it uses a memory address to dereference the value.
Original code:

l_l = 13134243433 + 42 * ((long)((((double)(13134243433)) * ((double)(13134243433))))) - ((long)((((double)(13134243433)) + ((double)(13134243433))))) + ((int)((((double)(l_l)) - ((double)(l_l))))) + ((int)((((double)(l_l)) - ((double)(13134243433)))));

Decompiled code:

iStack_20 = (iStack_20 - *0x2068) + (iStack_20 - iStack_20) + -0x30edca693;

*0x2068 is the issue

Test

Files:
1.zip

commands used:

r2 orig_exec
aaa
pdg @ sym.func_1

the issue is at the last for loop near the end of the function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant