ofrak
ofrak copied to clipboard
Improve asm patch testing
What is the use case for the feature?
Currently, our tests in toolchain_asm.py verify only that a fem is created, it does not verify that the patch would work as intended. This is most evident by the fact that one can supply empty .as files to the test and it will still pass. The current version of the test likely only catches whether the .as files contain syntactically incorrect assembly code, if the code is present at all.
Does the feature contain any proprietary information about another company's intellectual property? No.
How would you implement this feature?
Use the angr backend to emulate applying the patch and ensuring that the intended functionality changes are present in the final executable. Also, the test itself needs to be fixed - currently the manual_map maps segments to .as files out of order such that the resulting BOM is incorrect.
Are there any (reasonable) alternative approaches? N/A
Are you interested in implementing it yourself? Yes.
Linked to #236