-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
Pr/fasan multithreading fixes upstream #2955
Pr/fasan multithreading fixes upstream #2955
Conversation
…o add the observer, clippy, fmt, and at least linux compilation
…b functions. Only frida_windows_gdiplus tested. Linux not tested
…ub.com/mkravchik/LibAFL into pr/fasan-multithreading-fixes-upstream
…ub.com/mkravchik/LibAFL into pr/fasan-multithreading-fixes-upstream
Okay, I think I figured it out but it required digging around a lot in the guts of libafl_targets. Hopefully still works... |
I see, CI doesn't run if conflicts are present 🤦 |
Seems to work. @mkravchik see diff when you get a chance, the trick was to just not use |
@addisoncrump - thanks a lot! Indeed, lots of black magic involved. |
@@ -12,7 +12,7 @@ runs: | |||
with: { shared-key: "${{ runner.os }}-shared-fuzzer-cache" } | |||
- name: Install fuzzers deps | |||
shell: bash | |||
run: sudo apt-get update && sudo apt-get install -y nasm nlohmann-json3-dev gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-mipsel-linux-gnu g++-mipsel-linux-gnu gcc-powerpc-linux-gnu g++-powerpc-linux-gnu libc6-dev-i386-cross libc6-dev libc6-dev-i386 lib32gcc-11-dev lib32stdc++-11-dev libgtk-3-dev pax-utils python3-msgpack python3-jinja2 | |||
run: sudo apt-get update && sudo apt-get install -y nasm nlohmann-json3-dev gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gcc-mipsel-linux-gnu g++-mipsel-linux-gnu gcc-powerpc-linux-gnu g++-powerpc-linux-gnu libc6-dev-i386-cross libc6-dev libc6-dev-i386 lib32gcc-11-dev lib32stdc++-11-dev libgtk-3-dev pax-utils python3-msgpack python3-jinja2 g++-mingw-w64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@addisoncrump
we need this?
but it is strange that it fixed your problem. this action file is not used by windows vm at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(including frida_gdi_plus vm, the ci that failed before this change of yours)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libafl_targets/src/libfuzzer.c
Outdated
@@ -47,7 +47,7 @@ EXT_FUNC_IMPL(main, int, (int argc, char **argv), false) { | |||
#endif | |||
} | |||
|
|||
#if defined(_WIN32) | |||
#if defined(_WIN32) && !defined(__clang__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if this doesn't break libfuzzer_windows_asan.
i added the tests in #2961 let's see
Is there anything you need on my side to merge this? |
no but for now i want #2949 to be merged and bring those tests in that PR to see if it works on this branch too |
in my opinion probably better to change |
On which platform are you building this frida-gdiplus stuff with? You are using windows no? |
Can you delete g++-mingw-w64 dependency that was added in .github/workflows/fuzzer-tester-prepare/action.yml in your branch? Can you revert this Also please test |
Hi, I test on Windows, of course. The failure on Linux was fuzzer_test that ran clippy. only. |
libafl_targets/src/cmplog.c
Outdated
@@ -15,7 +15,7 @@ void *__libafl_asan_region_is_poisoned(void *beg, size_t size) { | |||
return NULL; | |||
} | |||
|
|||
#if defined(__clang__) | |||
#if defined(__clang__) && defined(_MSC_VER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for this you don't have to revert
@mkravchik |
it's not reverted. |
Here you go. |
This PR makes it possible to use Frida ASAN in realistic Windows multithreaded applications. On Windows, an application is created by default with a thread pool, and many system APIs invoke COM behind the scenes as a part of their normal functionality. COM can initiate a lot of activity on these thread pool threads without any direct request from the harness.
The main highlights of the PR are:
Known limitations: