-
Notifications
You must be signed in to change notification settings - Fork 115
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
Edge case / off by 1 error in bdshemu #106
Comments
ScimitarEnjoyer
added a commit
to ScimitarEnjoyer/bddisasm
that referenced
this issue
Sep 23, 2024
ScimitarEnjoyer
added a commit
to ScimitarEnjoyer/bddisasm
that referenced
this issue
Sep 23, 2024
ScimitarEnjoyer
added a commit
to ScimitarEnjoyer/bddisasm
that referenced
this issue
Sep 23, 2024
ScimitarEnjoyer
added a commit
to ScimitarEnjoyer/bddisasm
that referenced
this issue
Sep 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When an instruction cannot be emulated, the emulator sets
stop
to true, and on the next iteration returnsSHEMU_ABORT_CANT_EMULATE
.In cases where the last instruction cannot be emulated, this causes the emulator to return
SHEMU_SUCCESS
instead of the expectedSHEMU_ABORT_CANT_EMULATE
.How to reproduce this issue
Set up the shellcode to emulate only 1 instruction (
MaxInstructionsCount
= 1) and point it to an instruction it doesn't support (like a syscall). The emulator will returnSHEMU_SUCCESS
instead ofSHEMU_ABORT_CANT_EMULATE
because the max instruction count check precedes the previous instruction unsupported check.I have created a pull request for this issue:
#107
The text was updated successfully, but these errors were encountered: