libsass icon indicating copy to clipboard operation
libsass copied to clipboard

fuzz-test memory leaks error

Open qweryzh opened this issue 3 years ago • 0 comments

I use libsass 3.6.4 to os-fuzz test and find a bug

steps below: 1 build python3 infra/helper.py build_fuzzers --sanitizer address libsass 2 execute python3 infra/helper.py run_fuzzer libsass data_context_fuzzer -rss_limit_mb=0

errors listed below:

==13==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 5 byte(s) in 1 object(s) allocated from: #0 0x562e1d in malloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3 #1 0x595490 in LLVMFuzzerTestOneInput /src/data_context_fuzzer.cc:4:29 #2 0x49d761 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:556:15 #3 0x49cea5 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long, bool, fuzzer::InputInfo*, bool*) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:470:3 #4 0x49ef77 in fuzzer::Fuzzer::MutateAndTestOne() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:698:19 #5 0x49f9f5 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocatorfuzzer::SizedFile >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:832:5 #6 0x48e9ce in fuzzer::FuzzerDriver(int*, char***, int ()(unsigned char const, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:826:6 #7 0x4b71a2 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:19:10 #8 0x7f838a99882f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 1 byte(s) in 1 object(s) allocated from: #0 0x562e1d in malloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3 #1 0x595490 in LLVMFuzzerTestOneInput /src/data_context_fuzzer.cc:4:29 #2 0x49d761 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:556:15 #3 0x49f286 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocatorfuzzer::SizedFile >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:743:3 #4 0x49f6f9 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocatorfuzzer::SizedFile >&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:794:3 #5 0x48e9ce in fuzzer::FuzzerDriver(int*, char***, int ()(unsigned char const, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:826:6 #6 0x4b71a2 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:19:10 #7 0x7f838a99882f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

SUMMARY: AddressSanitizer: 6 byte(s) leaked in 2 allocation(s). INFO: to ignore leaks on libFuzzer side use -detect_leaks=0.

MS: 2 CMP-ShuffleBytes- DE: "\x01\x00\x00\x00"-; base unit: 438f7e09af996a9e2e50036acfdc07f3d3775e94 0x0,0x1,0x0,0x0, \x00\x01\x00\x00 artifact_prefix='./'; Test unit written to ./leak-3f096541a26b4800990ade37ff48bc9849b9d3cc

please replay as soon as possible, thanks!

qweryzh avatar Dec 10 '20 08:12 qweryzh