curl / curl-fuzzer

Quality assurance testing for the curl project
MIT License
85 stars 30 forks source link

Memory leaks reported #20

Closed rockdaboot closed 5 years ago

rockdaboot commented 6 years ago

After addign the patch in #19, I see

...
[/tmp/curl-fuzzer/corpora/curl_fuzzer/timeout-4625841444093952] Opened.. Read 8332 bytes, fuzzing.. complete !!

=================================================================
==17032==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 67 byte(s) in 2 object(s) allocated from:
    #0 0x4e4850 in __interceptor_malloc (/tmp/curl-fuzzer/curl_fuzzer+0x4e4850)
    #1 0x52b6fa in curl_domalloc /tmp/curl/lib/memdebug.c:175:9
    #2 0x52bfe8 in curl_dostrdup /tmp/curl/lib/memdebug.c:230:9
    #3 0x62460e in Curl_retry_request /tmp/curl/lib/transfer.c:1694:12
    #4 0x544c72 in multi_runsingle /tmp/curl/lib/multi.c:1930:24
    #5 0x53fb60 in curl_multi_perform /tmp/curl/lib/multi.c:2173:14
    #6 0x51d4a3 in fuzz_handle_transfer(fuzz_data*) /tmp/curl-fuzzer/curl_fuzzer.cc:382:5
    #7 0x51b6b7 in LLVMFuzzerTestOneInput /tmp/curl-fuzzer/curl_fuzzer.cc:93:3
    #8 0xaa712b in main /tmp/curl-fuzzer/standalone_fuzz_target_runner.cc:65:9
    #9 0x7fcd16138b16 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x22b16)

SUMMARY: AddressSanitizer: 67 byte(s) leaked in 2 allocation(s).
cmeister2 commented 6 years ago

Thanks. OSS-Fuzz reported this this morning; we're looking into it.

bagder commented 6 years ago

PR for a fix: https://github.com/curl/curl/pull/3042

cmeister2 commented 5 years ago

Think this is now fixed! Closing.