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

fix uc_mem write with cow when using upper half of the address #1920

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

PhilippTakacs
Copy link
Contributor

I missed a bug in my last fix.

uc->target_page_align is a uint32_t. When the binary not will only invert the 32 bit of the value. Used this in a binary and operator with a uint64_t will case the upper 32bit of the address to be 0. Therefor the bug only appears when the upper 32bit of the address are used.

Now a local uint64_t variable is used for the alignemend and the test uses a not page alligned address which does not fit in 32bit.

uc->target_page_align is a uint32_t. When the binary not will only
invert the 32 bit of the value. Used this in a binary and operator with
a uint64_t will case the upper 32bit of the address to be 0. Therefor
the bug only appears when the upper 32bit of the address are used.

Now a local uint64_t variable is used for the alignemend and the test
uses a not page alligned address which does not fit in 32bit.
@wtdcode wtdcode merged commit 97beeb6 into unicorn-engine:dev Jan 16, 2024
29 checks passed
@wtdcode
Copy link
Member

wtdcode commented Jan 16, 2024

Here you go, thanks!

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.

2 participants