oss-fuzz icon indicating copy to clipboard operation
oss-fuzz copied to clipboard

[WIP] Add `nix` to the projects (with Ubuntu packages)

Open Pamplemousse opened this issue 4 years ago • 2 comments

:warning: This is a Work-In-Progress that does not even work (yet?) :warning:

As I am struggling to integrate nix to OSS-fuzz, these PR (with google/oss-fuzz#6317) helps to keep track of the progress, and help gather feedback on approaches taken.

Context

As part of a fellowship, I work on fuzzing nix; More details on https://discourse.nixos.org/t/tweag-fellowship-fuzzing-nix-0 . One of the "end-goal" of the project is to integrate nix to OSS-fuzz; This PR is a step in that direction.

Approach

Unlike google/oss-fuzz#6317 ;

This approach aims to stay close to OSS-fuzz's philosophy:

  • use Docker for build-time reproducibility
  • compile the fuzzers statically While still:
  • leverage upstream's autotools system:
    • build nix libraries without hassle
    • add compilation of fuzz target
    • add extra flags to libraries (relies on nixos/nix#5175) for better fuzzer coverage and sanitization

Disadvantage: Doesn't work (yet); Dockerfile and build.sh are non trivial and will be a pain to maintain.

TODO

  • [ ] :warning: correct the runtime SEGFAULT...
  • [x] apply sanitizers to libraries
  • [ ] don't clone a fork:
    • [ ] integrate fuzz targets upstream
    • [ ] integrate local.mk upstream
  • [ ] compile and test coverage binary(ies)
  • [ ] add auto_ccs to projects.yaml if maintainers are OK
  • [x] sign the google-cla thing

cc @regnat

Pamplemousse avatar Aug 27 '21 18:08 Pamplemousse

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

google-cla[bot] avatar Aug 27 '21 18:08 google-cla[bot]

@googlebot I signed it!

Pamplemousse avatar Sep 02 '21 16:09 Pamplemousse