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

When the address of the trace returned by QEMURunner does not match the address executed by unicorn #86

Open
coderjingluo opened this issue Apr 5, 2024 · 3 comments
Labels

Comments

@coderjingluo
Copy link

Question

In practical applications, the trace returned when I use QEMURunner has inconsistent branches in simgr.step, but the input provided is the same. Why?

@rhelmot
Copy link
Member

rhelmot commented Apr 5, 2024

This is a well known problem - when tracing with basic block addresses, implementations will very frequently disagree in myriad ways about what basic block boundaries are. Our attempt at working around this problem lives in https://github.com/angr/angr/blob/master/angr/exploration_techniques/tracer.py, which tries to force angr (i.e. unicorn+vex basic blocks) to follow a qemu-user trace. However, most people have given up on account of it is just too hard.

@coderjingluo
Copy link
Author

This is a well known problem - when tracing with basic block addresses, implementations will very frequently disagree in myriad ways about what basic block boundaries are. Our attempt at working around this problem lives in https://github.com/angr/angr/blob/master/angr/exploration_techniques/tracer.py, which tries to force angr (i.e. unicorn+vex basic blocks) to follow a qemu-user trace. However, most people have given up on account of it is just too hard.

This is a well known problem - when tracing with basic block addresses, implementations will very frequently disagree in myriad ways about what basic block boundaries are. Our attempt at working around this problem lives in https://github.com/angr/angr/blob/master/angr/exploration_techniques/tracer.py, which tries to force angr (i.e. unicorn+vex basic blocks) to follow a qemu-user trace. However, most people have given up on account of it is just too hard.

If qemu_runner use qemu to generate trace, let him generate more context information about the block, when the execution branch is inconsistent with the trace, fallback state and set the context information corresponding to the block in the trace to the state, can it alleviate this situation?

@rhelmot
Copy link
Member

rhelmot commented Apr 8, 2024

It can. However you will still find the horrors lurking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants