Skip to content

Add test to check if result of methods returning big structs is corrupted due to bad handling of sret in frida 17#723

Open
PimentelM wants to merge 1 commit intovfsfitvnm:masterfrom
PimentelM:chore/frida-17-sret-test
Open

Add test to check if result of methods returning big structs is corrupted due to bad handling of sret in frida 17#723
PimentelM wants to merge 1 commit intovfsfitvnm:masterfrom
PimentelM:chore/frida-17-sret-test

Conversation

@PimentelM
Copy link
Copy Markdown

This PR adds two tests where we hook methods that return structs.

The first test has a struct that is small enough to fit in registers when returning, the other one has a struct that needs to make use of sret.

The first struct passes fine but when SRET is used the returned struct gets corrupted and accessing its contents might lead to errors if what was corrupted was a pointer. (In our case the string pointer gets corrupted).

It seems that this only happens when using .implementation = hooks due to some breaking change in how NativeCallback works in frida 17. ( Using frida 16 doesn't cause this issue)

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

Successfully merging this pull request may close these issues.

1 participant