-
-
Notifications
You must be signed in to change notification settings - Fork 975
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
compare-transform-pass breaks original control flows #1848
Comments
cf. AFLplusplus/AFLplusplus#1848 This patch fixes a problem that causes laf-intel DA to fail against libxml2_cve-2017-5969. However, the DA has not yet worked for mruby_hackerone-reports-185041.
This happens too with llvm 16, and with O3 and O0, so yeah this is a bug in our llvm module. these are a pain to debug and fix :-( ... |
I tried a fix in dad56ab - please test |
I guess laf crash in #1808 has the same root cause |
At least for the PoC, the pass no longer seems to break the control flow. :) I have two questions about dad56ab:
|
no that is different |
because I was tired and had little time :) fixed. |
Description
laf-intel's compare-transform-pass breaks original control flows. A PoC of the bug:
xmlStrEqual()
returns 1 if the two strings are equal. This PoC should exit successfully because the strings are both"foo"
.$ ./a.out msg is foo!
However, with transform-compare-pass, the PoC aborts.
$ ./a.out msg is not foo! Aborted (core dumped)
This result shows that transform-compare-pass has broken the original control flow. Perhaps the pass is designed for functions that return 0 when two arguments are equal, such as
strcmp()
ormemcmp()
.How to reproduce
Steps to reproduce the behavior
xmlStrEqual()
is defined.).LLVM_CONFIG=llvm-config-14 make all
).How to build the PoC without the pass
How to build the PoC with the pass
Expected behavior
Both the executables have the same output.
$ ./a.out msg is foo!
Screen output/Screenshots
None.
Additional context
Some envirnomental info
The text was updated successfully, but these errors were encountered: