JonathanSalwan / Triton

Triton is a dynamic binary analysis library. Build your own program analysis tools, automate your reverse engineering, perform software verification or just emulate code.
https://triton-library.github.io
Apache License 2.0
3.4k stars 524 forks source link

There is an unsupported addressing method on aarch64 LDR (register) #1234

Closed DiamondHunters closed 1 year ago

DiamondHunters commented 1 year ago

Hello! I got symbolic expression ref_213 = ((((((((0x0) << 8 | 0x0) << 8 | 0x0) << 8 | 0x0) << 8 | 0x0) << 8 | 0x0) << 8 | 0x0) << 8 | 0x0) # LDR operation - LOAD access When I try to symbolize ldr x19, [x2, x19] which in this form: LDR <Xt>, [<Xn|SP>, <R><m>]

I tried to read the source code and found no handling of this type in Triton\src\libtriton\arch\arm\aarch64\aarch64Semantics.cpp. I read and try to understand the two provided: /* LDR <Xt>, [<Xn|SP>], #<simm> */ /* LDR <Xt>, [<Xn|SP>, #<simm>]! */ But adding support for LDR <Xt>, [<Xn|SP>, <R><m>] is still difficult for me as a beginner.

So for now, All I can do is feeding back the problem here and hope who can solve it. Thank you for your excellent framework.

JonathanSalwan commented 1 year ago

Mmh, why do you have to add the support of LDR <Xt>, [<Xn|SP>, <R><m>] while it's already supported?

ref_213 = ((((((((0x0) << 8 | 0x0) << 8 | 0x0) << 8 | 0x0) << 8 | 0x0) << 8 | 0x0) << 8 | 0x0) << 8 | 0x0)

Just means that you read the value 0 from your memory access [x2, x19].

DiamondHunters commented 1 year ago

I'm sorry for my ignorance and thank you for your patience. This is caused by my own lack of understanding.