You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
Centipede intercepts memcmp (and will intercept more in future).
Sanitizers (ASAN, etc) also intercept the same functions.
The way we currently build binaries for Centipede's --extra_binaries= makes these interceptors conflict.
% cat memcmp_fuzz.cc
#include <cstdint>
#include <cstddef>
#include <cstring>
volatile auto M = &memcmp;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
char x[3] = {'z', 'z', 'z'};
if (size != 2) return 0;
M(x, data, 3); // should trigger an ASAN report.
return 0;
}
% clang -O2 -fsanitize=address,fuzzer ./memcmp_fuzz.cc -o lf
% ./lf zz 2>&1 | grep ERROR
==3371320==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000032 at pc 0x56499c281f3c bp 0x7ffc82201d00 sp 0x7ffc822014b0
libFuzzer+ASAN can easily detect a buffer overflow inside memcmp.
Internally, we build Centipede's runner together with the target, and the #if !defined(ADDRESS_SANITIZER) inside runner_interceptors.cc avoids this problem.
The text was updated successfully, but these errors were encountered:
Centipede intercepts
memcmp
(and will intercept more in future).Sanitizers (ASAN, etc) also intercept the same functions.
The way we currently build binaries for Centipede's
--extra_binaries=
makes these interceptors conflict.libFuzzer+ASAN can easily detect a buffer overflow inside memcmp.
Internally, we build Centipede's runner together with the target, and the
#if !defined(ADDRESS_SANITIZER)
insiderunner_interceptors.cc
avoids this problem.The text was updated successfully, but these errors were encountered: