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

LibAFL_QEMU: Issues switching between thumb and non-thumb on ARM #2622

Open
domenukk opened this issue Oct 17, 2024 · 0 comments
Open

LibAFL_QEMU: Issues switching between thumb and non-thumb on ARM #2622

domenukk opened this issue Oct 17, 2024 · 0 comments
Assignees
Labels
bug Something isn't working qemu LibAFL QEMU

Comments

@domenukk
Copy link
Member

A breakpoint that switches to non-thumb and setting PC to thumb will lead to non-thumb execution:

In LibAFL_QEMU on arm

  • Set Lr to a non-thumb addr
  • Set Breakpoint on that address
  • Run a thumb function until return (first exec runs fine, in thumb)
  • After the breakpoint on non-thumb triggers, re-run that same function by placing the Pc to the entry of the thumb function (with last bit set)
    => The second execution is happening in non-thumb mode

A workaround is to set the return address to thumb, but this is not a general solution

@domenukk domenukk added the bug Something isn't working label Oct 17, 2024
@domenukk domenukk added the qemu LibAFL QEMU label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working qemu LibAFL QEMU
Projects
None yet
Development

No branches or pull requests

2 participants