Open puhley opened 2 years ago
Note: these should all be expressible right now via the per-task _env
template variables (target_env
, analyzer_env
, supervisor_env
, &c). But this PR suggests a much more usable default, which I support, especially due to how error-prone the external symbolizer machinery is (e.g. the specified symbolizer must be exactly named llvm-symbolizer
).
My questions:
run.sh
doesn't mean we should be. Maybe these defaults should more properly be part of the onefuzz-agent
, or the libraries it uses to spawn processes.llvm-symbolizer
config, is run.sh
the right place to set the UBSan options?I know we at least have tests for parsing TSan crash logs, but not UBSan. So we'll really want to validate the end-to-end behavior for the additional sanitizers.
@puhley, I've split this out into the following issues:
I think the correct place to configure sanitizer env vars is in the library code used to invoke targets. This lives in the input-tester
crate and in the input_tester
module of the onefuzz
utility crate. I've described this in more detail in #1773.
This approach makes sense to me. Should we close this issue and transfer the discussion to the new issues or does this issue remain open until the sub-issues are complete?
Currently, the libfuzzer implementation only supports ASAN on Linux instances. In
/src/runtime-tools/linux/run.sh
, OneFuzz sets the following environment variable to enable ASAN:export ASAN_SYMBOLIZER_PATH=/onefuzz/bin/llvm-symbolizer
However, it is possible to modify
run.sh
to support additional sanitizers such as UBSAN, MSAN, and TSAN. An initial proposal would be to add the following environment variables torun.sh
:By adding these environment variables, libfuzzer could be used with more sanitizers than just ASAN.
A more advanced implementation might be to allow people to specify the environment variables via the command line. However, considering that the environment variables are to specify the location of the llvm-symbolizer, and the location of that binary is controlled by OneFuzz, it seems like it is a better short-term approach to make OneFuzz set these environment variables.
If approved, I can create a pull request with these changes.
AB#35935