Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging issue in gnutls_idna_parser_fuzzer #417

Closed
Dor1s opened this issue Feb 23, 2017 · 16 comments
Closed

Logging issue in gnutls_idna_parser_fuzzer #417

Dor1s opened this issue Feb 23, 2017 · 16 comments

Comments

@Dor1s
Copy link
Contributor

Dor1s commented Feb 23, 2017

If you take a look at performance report for gnutls_idna_parser_fuzzer: https://oss-fuzz.com/v2/performance-report/libFuzzer_gnutls_idna_parser_fuzzer/libfuzzer_asan_gnutls/latest

You'll see that it suffers a lot from startup_crash issue. Actually, there is a logging issue due to printf being called for (almost?) every input: https://gitlab.com/gnutls/gnutls/blob/master/devel/fuzz/gnutls_idna_parser_fuzzer.cc#L34

Could you please remove that printf from fuzz target or ping maintainers to remove it and never add it again? :)

Regarding incorrect verdict from performance analysis, we are working on it.

@Dor1s
Copy link
Contributor Author

Dor1s commented Feb 23, 2017

@alex, I would like to assign this to you, but cannot :)

@alex
Copy link
Contributor

alex commented Feb 23, 2017

CC @nmav who wrote that fuzzer.

@nmav
Copy link
Contributor

nmav commented Feb 23, 2017

Done

@alex
Copy link
Contributor

alex commented Feb 23, 2017

Is there a way for us to force rebuild?

gnutlsmirror pushed a commit to gnutls/gnutls that referenced this issue Feb 23, 2017
see request in:
  google/oss-fuzz#417

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
@inferno-chromium
Copy link
Collaborator

No, sorry no way to force rebuild, filed #419.
https://oss-fuzz-build-logs.storage.googleapis.com/build_logs/gnutls/latest.txt
devel/fuzz/gnutls_idna_parser_fuzzer.cc:34:24: error: use of undeclared identifier 'strlen'
assert(out.size == strlen(out.data));

@inferno-chromium
Copy link
Collaborator

@nmav - can you look at the last failure.

@nmav
Copy link
Contributor

nmav commented Feb 24, 2017

@inferno-chromium I've committed a fix to include string.h.

@Dor1s
Copy link
Contributor Author

Dor1s commented Feb 24, 2017

Thanks for the fixes, I've kicked off the next build manually.

@Dor1s
Copy link
Contributor Author

Dor1s commented Feb 24, 2017

One more error:

+ clang++ -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-coverage=trace-pc-guard,trace-cmp -stdlib=libc++ -std=c++11 -Ilib/includes devel/fuzz/gnutls_idna_parser_fuzzer.cc -o /out/gnutls_idna_parser_fuzzer lib/.libs/libgnutls.a -lFuzzingEngine -lpthread -Wl,-Bstatic -lhogweed -lnettle -lgmp -Wl,-Bdynamic
devel/fuzz/gnutls_idna_parser_fuzzer.cc:35:24: error: no matching function for call to 'strlen'
    assert(out.size == strlen(out.data));
                       ^~~~~~
/usr/include/assert.h:89:5: note: expanded from macro 'assert'
  ((expr)                                                               \
    ^~~~
/usr/include/string.h:394:15: note: candidate function not viable: no known conversion from 'unsigned char *' to 'const char *' for 1st argument
extern size_t strlen (const char *__s)
              ^
1 error generated.

@nmav
Copy link
Contributor

nmav commented Feb 24, 2017

Updated.

@Dor1s
Copy link
Contributor Author

Dor1s commented Feb 24, 2017

Cool, now build is successful, thanks @nmav ! Though it is marked as UNSTABLE due to crashes which are easy to find (https://oss-fuzz-build-logs.storage.googleapis.com/status.html). All those crashes should have been already automatically filed in the bug tracker, or they will be filed soon :)

@alex
Copy link
Contributor

alex commented Mar 5, 2017

Can this be closed now?

@alex
Copy link
Contributor

alex commented Mar 6, 2017

Why is that happening marked as reproducible: no, if it's 100%? (I didn't see it because I only follow the issue tracker)

@inferno-chromium
Copy link
Collaborator

I couldn't reproduce that locally, need to debug more.

@inferno-chromium
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants