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
Oss-Fuzz builds failing for Tor #2836
Comments
|
I can repro this if I build tor's fuzzers using the The stack given by ASAN looks pretty useless here. gdb on the other hand says this is the stack: Is there anything actionable here? Or does it look like an ASAN bug? |
|
Hm. It looks like the crash is happening inside libevent, when libevent tries to call getrandom(), pointing at an address on the stack. The libevent code looks a little weird here, but doesn't look like it should crash. (Fortunately, libevent's prng is only used for generating DNS transaction IDs.) Conceivably it could be an ASAN bug -- I don't have much experience with finding those, however. |
|
Hmm...there's a similar crash in libsodium. @guidovranken did you say you thought this was an ASAN bug? Did you solve the issue work around it in cryptofuzz? cc @derwolfe |
|
@jonathanmetzman this is not the ASAN bug that we discussed (this caused ASAN on 32 bit to find spurious/non reproducible issues). It is a libsodium problem: jedisct1/libsodium#859 |
|
I'm probably stating the obvious.. But since two distinct libraries crash at getrandom, the sanitizer probably forgets to overwrite the getrandom hook (both traces result in EIP = NULL). |
Right. But didn't you mention this in a deleted comment on my PR to revert the clang roll? @vitalybuka I haven't bisected this for sure and I don't have a minimum reproducer, but it looks like this could be at fault since the libsodium bug only started occurring when clang was rolled to 8288453f6aac05080b751b680455349e09d49825 but did not occur when clang was at f7e52fbdb5a7af8ea0808e98458b497125a5eca1 |
|
CC @morehouse |
|
@vitalybuka |
|
@guidovranken It looks like jedisct1/libsodium@2032201 is wrong (libsodium build still failing). I think it is because they are not checking for ASAN usage properly. This is right way. But it might be worth seeing if clang folks can fix upstream before bugging libsodium |
|
Ping @vitalybuka |
|
I have a tiny reproducer here. It must be compiled on glibc 2.23 or earlier (and possibly some later, probably any that doesn't have ASAN's interceptor seems to let this compile when it shouldn't: |
That's probably true for other interceptors. Are you asking to use __GLIBC_PREREQ(2, 25) compile time to decide to have this interceptor? |
I guess so. Is this going to be done when clang is compiled (ie: if clang is built with glibc <2.25) or when the target project is compiled? Either should work for us. |
compiler-rt |
Summary: Fixes google/oss-fuzz#2836 Reviewers: eugenis Subscribers: dberris, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68178 llvm-svn: 373284
Summary: Fixes google/oss-fuzz#2836 Reviewers: eugenis Subscribers: dberris, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68178 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@373284 91177308-0d34-0410-b5e6-96231b3b80d8
Summary: Fixes google/oss-fuzz#2836 Reviewers: eugenis Subscribers: dberris, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68178 llvm-svn: 373681
Summary: Fixes google/oss-fuzz#2836 Reviewers: eugenis Subscribers: dberris, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68178 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@373681 91177308-0d34-0410-b5e6-96231b3b80d8
|
Thanks @vitalybuka. Looks like the patch just missed the chrome clang roll @guidovranken @nmathewson this should get fixed on its own within a few weeks when chrome rolls clang again (we use Chrome's clang because they use very close to trunk but ensure it is stable). I may try to roll clang manually before that since the roll should be small but I'm not sure since now is a particularly bad time to break things for us because of other things going on right now. |
Summary: Fixes google/oss-fuzz#2836 Reviewers: eugenis Subscribers: dberris, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68178 llvm-svn: 373284
Summary: Fixes google/oss-fuzz#2836 Reviewers: eugenis Subscribers: dberris, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68178 llvm-svn: 373681
Hi! The fuzzers are crashing with a weird error on startup for Tor:
(From https://oss-fuzz-build-logs.storage.googleapis.com/log-02b946c3-e4ad-42e6-bd96-6d78861d0a97.txt )
This does not happen when I try to build on my own with libfuzzer. Any insight here?
The text was updated successfully, but these errors were encountered: