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

Support Fuzzing JavaScript with Jazzer.js #8324

Open
jonathanmetzman opened this issue Aug 23, 2022 · 14 comments
Open

Support Fuzzing JavaScript with Jazzer.js #8324

jonathanmetzman opened this issue Aug 23, 2022 · 14 comments

Comments

@jonathanmetzman
Copy link
Contributor

No description provided.

@jonathanmetzman
Copy link
Contributor Author

CC @fmeum @bertschneider

jonathanmetzman added a commit that referenced this issue Aug 23, 2022
jonathanmetzman added a commit that referenced this issue Aug 23, 2022
Prepare for JavaScript fuzzing
Related: #8324
jonathanmetzman added a commit that referenced this issue Jan 31, 2023
This PR enables using Jazzer.js for fuzzing Node.js projects in
OSS-Fuzz.

Part of #8324

---------

Co-authored-by: jonathanmetzman <[email protected]>
@oliverchang
Copy link
Collaborator

oliverchang commented Feb 1, 2023

Some remaining pieces here:

  • ClusterFuzz side changes for stacktrace parsing and reporting.
  • ClusterFuzz side change for job setup
  • Verify that OSS-Fuzz build automation works and make any changes if needed.

@kyakdan
Copy link
Contributor

kyakdan commented Feb 1, 2023

One more thing from my side: We still need to integrate source-based coverage reporting for JavaScript in OSS-Fuzz. This has been recently added to Jazzer.js, and we'll take care of it.

@ljharb
Copy link
Contributor

ljharb commented Feb 2, 2023

Will this include some way to permanently persist any failing test inputs?

@jonathanmetzman
Copy link
Contributor Author

Will this include some way to permanently persist any failing test inputs?

Not sure I understand, but I think yes, this is how oss-fuzz works. Project maintainers are notified when a bug is found and given the crashing input.

@kyakdan
Copy link
Contributor

kyakdan commented Feb 2, 2023

As @jonathanmetzman, this is the workflow in OSS-Fuzz. Bugs, including the crashing inputs, are only disclosed to the public once they are fixed, or the disclosure deadline passes with no fix from the maintainers.

@ljharb
Copy link
Contributor

ljharb commented Feb 2, 2023

That's great - so it's not automatic, but there's zero chance a failed input will be lost, for example by rerunning a test?

@jonathanmetzman
Copy link
Contributor Author

That's great - so it's not automatic, but there's zero chance a failed input will be lost, for example by rerunning a test?

I don't know what you mean by "automatic".

There's almost no chance. Sometimes we delete testcases that are non-deterministic and infrequently occurring.

@ljharb
Copy link
Contributor

ljharb commented Feb 2, 2023

I meant like, a github action that preserves somehow - in a database elsewhere - failed inputs.

If it can transmit the failures to me somehow, that suffices, since I can just manually commit them :-)

@kyakdan
Copy link
Contributor

kyakdan commented Feb 3, 2023

Here is the link to all public issues found by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/list?q=&can=1. For each issue, you have several details, including a link to download the test case (failing input). Ideally, you then have a unit test with this input to ensure that you test for regressions and verify your fix for the issue. Which testing framework do you use for JavaScript? Jazzer.js has a Jest integration enabling you to write fuzz tests using the usual syntax and automatically create regression tests for found issues.

@ljharb
Copy link
Contributor

ljharb commented Feb 3, 2023

I use https://npmjs.com/tape.

@kyakdan
Copy link
Contributor

kyakdan commented Feb 3, 2023

I'm not aware of tape, but see that you are the maintainer of it. Would you be interested in adding support for fuzzing runs using Jazzer.js?

@ljharb
Copy link
Contributor

ljharb commented Feb 3, 2023

I'm not sure what that would entail, but sure, potentially.

@kyakdan
Copy link
Contributor

kyakdan commented Feb 3, 2023

Sounds great! We can collaborate there and we can provide the support you need regarding Jazzer.js.

oliverchang added a commit that referenced this issue Feb 9, 2023
oliverchang added a commit that referenced this issue Feb 9, 2023
eamonnmcmanus pushed a commit to eamonnmcmanus/oss-fuzz that referenced this issue Mar 15, 2023
This PR enables using Jazzer.js for fuzzing Node.js projects in
OSS-Fuzz.

Part of google#8324

---------

Co-authored-by: jonathanmetzman <[email protected]>
eamonnmcmanus pushed a commit to eamonnmcmanus/oss-fuzz that referenced this issue Mar 15, 2023
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