-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
pkg/fuzzer: occasional TestFuzz failures #5674
Comments
One more case from the GitHub CI: https://github.com/google/syzkaller/actions/runs/13011351196/job/36289590277 I think we should run the test under |
It should hopefully let us debug google#5674.
From #5711 (comment)
Now the mystery is
|
Okay, we're calling Line 352 in afe4eff
https://codebrowser.dev/glibc/glibc/nptl/allocatestack.c.html#142 It doesn't seem that we can
Is making the TestFuzz/parent executor process more tolerant to these kinds of issues the way to go here? We also shouldn't have corrupted the memory. The test executes some very very simple code that does no memory manipulation: syzkaller/executor/common_test.h Lines 154 to 168 in afe4eff
|
It should hopefully let us debug #5674.
I tried building the test with ASan:
, but to no success. |
A simplified (and much faster) test to trigger the problem:
On my side, it also doesn't reproduce if I add |
The code is invoked here: syzkaller/executor/executor.cc Line 583 in 8f267ce
The change above sometimes leads to a different error:
So Cc @dvyukov |
After a debugging session with @ramosian-glider: For binaries compiled with |
MAP_FIXED_NOREPLACE allows to fail early if we happened to overlap with an existing memory mapping. It should help detects bugs google#5674 at an earlier stage, before it led to memory corruptions. MAP_FIXED_NOREPLACE is supported from Linux 4.17, which is okay for all syzkaller use cases on syzbot. There's no such option for some of the supported OSes, so set it depending on the configuration we're building for.
Alternatives:
|
Keeping SYZ_DATA_OFFSET looks better for reproducibility. We could also compile with -static-pie on linux. Surprised pthread calls malloc for -static binaries. |
The current default value sometimes intersects with the addresses used by malloc, which causes executor memory corruptions. Closes google#5674.
MAP_FIXED_NOREPLACE allows to fail early if we happened to overlap with an existing memory mapping. It should help detects bugs #5674 at an earlier stage, before it led to memory corruptions. MAP_FIXED_NOREPLACE is supported from Linux 4.17, which is okay for all syzkaller use cases on syzbot. There's no such option for some of the supported OSes, so set it depending on the configuration we're building for.
The current default value sometimes intersects with the addresses used by malloc, which causes executor memory corruptions. Closes google#5674.
The current default value sometimes intersects with the addresses used by malloc, which causes executor memory corruptions. Closes #5674.
Once in a while, we observe failures like this (both on syzbot and on GitHub CI):
The text was updated successfully, but these errors were encountered: