NationalSecurityAgency / ghidra

Ghidra is a software reverse engineering (SRE) framework
https://www.nsa.gov/ghidra
Apache License 2.0
49.09k stars 5.65k forks source link

AArch64: Add missing load to ldapr #6593

Open Sleigh-InSPECtor opened 1 month ago

Sleigh-InSPECtor commented 1 month ago

As part of a research project testing the accuracy of the sleigh specifications compared to real hardware, we observed an unexpected behaviour in the ldapr instruction for AARCH64. According to Section C6.2.136, the expected behaviour is to load a value based on address from the second operand. While the current behaviour instead performs no memory loads for the 64 bit variant of the instruction, and uses an uninitialised value.

e.g.: 0xdfc3bff8 "ldapr xzr, [x30]" with x30 = 0

Hardware Reference: Loaded Pages = 0x0 Existing Spec: Loaded Pages = None Patched Spec: Loaded Pages - 0x0