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

libFuzzer minimizer needs to do basic stack comparison #452

Closed
inferno-chromium opened this issue Mar 13, 2017 · 10 comments
Closed

libFuzzer minimizer needs to do basic stack comparison #452

inferno-chromium opened this issue Mar 13, 2017 · 10 comments
Assignees

Comments

@inferno-chromium
Copy link
Collaborator

As i talked with @mbarbella, libFuzzer minimizer currently does not check for stack before trying to minimize. This fails on several targets which get engulfed with timeouts or other crash types. It is important to compare crash type and minimal stack frames comparison (like top 10) before minimizing further. This is needed to enable #250.

@kcc
Copy link
Contributor

kcc commented Mar 15, 2017

I understand the problem in principle, but could you please provide some examples (logs or reproducers)?
libFuzzer know little about the type of crash: it can distinguish timeouts from OOM from asan-ish bugs
but can not currently distinguish different stack traces. It can be enhanced, but I'm not sure if it's the right place to do so.

@inferno-chromium
Copy link
Collaborator Author

atleast one example i saw was #250 (comment). @mbarbella - can you provide more examples, since you are already testing this with several testcases.

@kcc
Copy link
Contributor

kcc commented Mar 24, 2017

quick check: do you still need this, and is this on critical path for #250, or just good to have?

@oliverchang
Copy link
Collaborator

oliverchang commented Mar 24, 2017

It's definitely good to have, but might be a bit too early to say whether if this is still critical to #250.

We'll need to do another pass on current CF testcases once we pick up the new builds to see how many of them are still failing minimization. We'll probably know early next week.

@inferno-chromium
Copy link
Collaborator Author

inferno-chromium commented Mar 25, 2017

@kcc - It is definitely important since many targets till timeouts, and i saw this across multiple testcases previously. So, it is not blocking since we will just keep unminimized testcase, but sometime needs fixing when you get time.

jyknight pushed a commit to jyknight/llvm-monorepo-old1 that referenced this issue Mar 25, 2017
… minimization if another bug was found during minimization (google/oss-fuzz#452)

llvm-svn=298755
earl pushed a commit to earl/llvm-mirror that referenced this issue Mar 25, 2017
… minimization if another bug was found during minimization (google/oss-fuzz#452)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298755 91177308-0d34-0410-b5e6-96231b3b80d8
@kcc
Copy link
Contributor

kcc commented Mar 25, 2017

This requires ASAN_OPTIONS=dedup_token_length=3 (or other value).
When DEDUP_TOKEN: something is present in the crash log,
libFuzzer will compare the contents of this string before and after minimization.
If the values don't match, the minimizer will stop and report the input from before the last attempt.

@oliverchang
Copy link
Collaborator

Thanks Kostya!

This is an unrelated note, but it looks like reports are broken (truncated) if symbolize=0 and dedup_token_length=3.

==55==ERROR: AddressSanitizer: crash-type on address 0x61500000e180 at pc 0x000001518cb5 bp 0x7ffee33391f0 sp 0x7ffee33391e8
READ of size 8 at 0x61500000e180 thread T0
    #0 0x1518cb4  (/out/libreoffice/pptfuzzer+address)

We'll force on symbolize=1 and dedup_token_length=3 during minimization, but our default is symbolize=0. Just a head's up in case you were ever planning to turn on dedup_token_length=3 by default.

@kcc
Copy link
Contributor

kcc commented Mar 29, 2017

Why do we have symbolize=0 on oss-fuzz?

@oliverchang
Copy link
Collaborator

We want to symbolize with llvm-symbolizer -inlining=false for de-dupping purposes.

@oliverchang
Copy link
Collaborator

I'm guessing there's nothing left to do here?

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

3 participants