[SAN] Fix broken exitcode policy

The entire exitcode detection strategy was broken since sanitizers’ exitcode flag
is global. This effectively means that the last setenv was the one effectively used
despite the sanitizer type. This issue doesn’t appear to affect any targets where
the SIGABRT signal was monitored since the crash parsing was achieved from
ptrace signal backend. There was just a small chance of losing some crashes in
case sanitizer runtime lib crashed internally when generating the reports.

This commit refactors the entire policy unifying all sanitizers to a single exitcode.
Since current logic only supports ASan reports parsing, we don’t need to explicitly
identify the sanitizer type since file parsing will early fail due to invalid header. If
more report types are added, we might need to add some logic there.

Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
5 files changed
tree: 9da68877cb3972b3d2b6fcc73d35dceb6cb3f475
  1. android/
  2. docs/
  3. examples/
  4. libhfuzz/
  5. linux/
  6. mac/
  7. posix/
  8. third_party/
  9. tools/
  10. .gitignore
  11. .gitmodules
  12. arch.h
  13. CHANGELOG
  14. cmdline.c
  15. cmdline.h
  16. common.h
  17. CONTRIBUTING
  18. COPYING
  19. display.c
  20. display.h
  21. files.c
  22. files.h
  23. fuzz.c
  24. fuzz.h
  25. honggfuzz.c
  26. log.c
  27. log.h
  28. Makefile
  29. mangle.c
  30. mangle.h
  31. README.md
  32. report.c
  33. report.h
  34. sancov.c
  35. sancov.h
  36. sanitizers.c
  37. sanitizers.h
  38. subproc.c
  39. subproc.h
  40. util.c
  41. util.h
README.md

honggfuzz

Description

A security oriented, feedback-driven, evolutionary, easy-to-use fuzzer with interesting analysis options. See USAGE for details

Code

Requirements

  • Linux - The BFD library (libbfd-dev) and libunwind (libunwind-dev/libunwind8-dev)
  • FreeBSD - gmake
  • Android - Android SDK/NDK. Also see this detailed doc on how to build and run it
  • Windows - CygWin
  • Darwin/OS X - Xcode 10.8+
  • if Clang/LLVM is used - the BlocksRuntime Library (libblocksruntime-dev)

Trophies

The tool has been used to find a few interesting security problems in major software packages; Examples:

Other

This is NOT an official Google product.