OSS-Fuzz - continuous fuzzing for open source software.
Go to file
Dongge Liu a80fd730e4
Revert "target_experiment: don't use gcloud. (#11701)" (#11727)
This reverts commit 66bcb5af81 to help
investigate a recent slowness and errors in OSS-Fuzz-Gen.
Related: https://github.com/google/oss-fuzz-gen/pull/177.

Specially, here is [the
error](https://pantheon.corp.google.com/logs/query;cursorTimestamp=2024-03-25T06:45:55.502596773Z;duration=P7D;query=resource.type%3D%22k8s_container%22%0Aresource.labels.project_id%3D%22oss-fuzz%22%0Aresource.labels.location%3D%22us-central1-c%22%0Aresource.labels.cluster_name%3D%22llm-experiment%22%0Aresource.labels.namespace_name%3D%22default%22%0Alabels.k8s-pod%2Fbatch_kubernetes_io%2Fcontroller-uid%3D%226d6e5719-618b-4e3d-a161-065c116ccfc0%22%20severity%3E%3DDEFAULT%0A--Hide%20similar%20entries%0A-%2528textPayload%3D~%22WARNING:root:Missing%20result%20JSON%20of%20benchmark%20instance:%20%5B%5E%20%3D%5Ct%5Cn%5Cr%5Cf%5C%22%5C%2528%5C%2529%5C%5B%5C%5D%5C%7C'%5D%2B%20-%20%2528%2528%3F:%5Cd%5B,.%5D%3F%2529*%5Cd%2529%22%2529%0A--End%20of%20hide%20similar%20entries%0Atimestamp%3D%222024-03-25T06:45:55.502596773Z%22%0AinsertId%3D%22fw412us1tsys1vfh%22?project=oss-fuzz)
shown in recent experiments:
```json
{
  "textPayload": "Traceback (most recent call last):\t  File \"/tmp/tmpi8uy26ij/infra/build/functions/target_experiment.py\", line 296, in <module>\t    main()\t  File \"/tmp/tmpi8uy26ij/infra/build/functions/target_experiment.py\", line 289, in main\t    run_experiment(args.project, args.target, args.args, args.upload_output_log,\t  File \"/tmp/tmpi8uy26ij/infra/build/functions/target_experiment.py\", line 255, in run_experiment\t    build_lib.wait_for_build(build_id, credentials, 'oss-fuzz')\t  File \"/tmp/tmpi8uy26ij/infra/build/functions/build_lib.py\", line 627, in wait_for_build\t    id=build_id).execute()\t                 ^^^^^^^^^\t  File \"/tmp/tmpi8uy26ij/venv/lib/python3.11/site-packages/googleapiclient/_helpers.py\", line 134, in positional_wrapper\t    return wrapped(*args, **kwargs)\t           ^^^^^^^^^^^^^^^^^^^^^^^^\t  File \"/tmp/tmpi8uy26ij/venv/lib/python3.11/site-packages/googleapiclient/http.py\", line 892, in execute\t    resp, content = _retry_request(\t                    ^^^^^^^^^^^^^^^\t  File \"/tmp/tmpi8uy26ij/venv/lib/python3.11/site-packages/googleapiclient/http.py\", line 204, in _retry_request\t    raise exception\t  File \"/tmp/tmpi8uy26ij/venv/lib/python3.11/site-packages/googleapiclient/http.py\", line 177, in _retry_request\t    resp, content = http.request(uri, method, *args, **kwargs)\t                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\t  File \"/tmp/tmpi8uy26ij/venv/lib/python3.11/site-packages/google_auth_httplib2.py\", line 209, in request\t    self.credentials.before_request(self._request, method, uri, request_headers)\t  File \"/tmp/tmpi8uy26ij/venv/lib/python3.11/site-packages/google/auth/credentials.py\", line 133, in before_request\t    self.refresh(request)\t  File \"/tmp/tmpi8uy26ij/venv/lib/python3.11/site-packages/google/auth/compute_engine/credentials.py\", line 99, in refresh\t    self._retrieve_info(request)\t  File \"/tmp/tmpi8uy26ij/venv/lib/python3.11/site-packages/google/auth/compute_engine/credentials.py\", line 79, in _retrieve_info\t    info = _metadata.get_service_account_info(\t           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\t  File \"/tmp/tmpi8uy26ij/venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py\", line 227, in get_service_account_info\t    return get(\t           ^^^^\t  File \"/tmp/tmpi8uy26ij/venv/lib/python3.11/site-packages/google/auth/compute_engine/_metadata.py\", line 146, in get\t    response = request(url=url, method=\"GET\", headers=_METADATA_HEADERS)\t               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\t  File \"/tmp/tmpi8uy26ij/venv/lib/python3.11/site-packages/google_auth_httplib2.py\", line 119, in __call__\t    response, data = self.http.request(\t                     ^^^^^^^^^^^^^^^^^^\t  File \"/tmp/tmpi8uy26ij/venv/lib/python3.11/site-packages/httplib2/__init__.py\", line 1724, in request\t    (response, content) = self._request(\t                          ^^^^^^^^^^^^^^\t  File \"/tmp/tmpi8uy26ij/venv/lib/python3.11/site-packages/httplib2/__init__.py\", line 1444, in _request\t    (response, content) = self._conn_request(conn, request_uri, method, body, headers)\t                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\t  File \"/tmp/tmpi8uy26ij/venv/lib/python3.11/site-packages/httplib2/__init__.py\", line 1367, in _conn_request\t    conn.request(method, request_uri, body, headers)\t  File \"/usr/lib/python3.11/http/client.py\", line 1282, in request\t    self._send_request(method, url, body, headers, encode_chunked)\t  File \"/usr/lib/python3.11/http/client.py\", line 1328, in _send_request\t    self.endheaders(body, encode_chunked=encode_chunked)\t  File \"/usr/lib/python3.11/http/client.py\", line 1277, in endheaders\t    self._send_output(message_body, encode_chunked=encode_chunked)\t  File \"/usr/lib/python3.11/http/client.py\", line 1037, in _send_output\t    self.send(msg)\t  File \"/usr/lib/python3.11/http/client.py\", line 998, in send\t    self.sock.sendall(data)\tBrokenPipeError: [Errno 32] Broken pipe\t",
  "insertId": "fw412us1tsys1vfh",
  "resource": {
    "type": "k8s_container",
    "labels": {
      "location": "us-central1-c",
      "namespace_name": "default",
      "pod_name": "ofg-pr-177-dg-cxszc",
      "cluster_name": "llm-experiment",
      "container_name": "experiment",
      "project_id": "oss-fuzz"
    }
  },
  "timestamp": "2024-03-25T06:45:55.502596773Z",
  "severity": "ERROR",
  "labels": {
    "k8s-pod/batch_kubernetes_io/controller-uid": "6d6e5719-618b-4e3d-a161-065c116ccfc0",
    "k8s-pod/job-name": "ofg-pr-177-dg",
    "compute.googleapis.com/resource_name": "gke-llm-experiment-ofg-pr-exp-2621ef4f-sms5",
    "k8s-pod/batch_kubernetes_io/job-name": "ofg-pr-177-dg",
    "k8s-pod/controller-uid": "6d6e5719-618b-4e3d-a161-065c116ccfc0"
  },
  "logName": "projects/oss-fuzz/logs/stderr",
  "receiveTimestamp": "2024-03-25T06:45:57.681367653Z"
}
```
2024-03-25 23:39:11 +11:00
.allstar Opt out of allstar binary artifacts check (#7816) 2022-06-08 09:37:08 -04:00
.clusterfuzzlite ClusterFuzzLite: fix fuzzer (#11649) 2024-02-28 22:32:52 -05:00
.github PR helper removes maintainers from known contributors. (#10773) 2023-08-02 18:10:24 +10:00
docs build(deps-dev): bump nokogiri from 1.14.3 to 1.16.2 in /docs (#11572) 2024-02-21 11:14:27 -05:00
infra Revert "target_experiment: don't use gcloud. (#11701)" (#11727) 2024-03-25 23:39:11 +11:00
projects lua: fix .dict and .options filenames (#11721) 2024-03-23 20:51:36 +00:00
tools/vscode-extension vscode: project gen: adjust CXXFLAGS for cpp builds (#11412) 2023-12-27 11:06:35 +00:00
.dockerignore [ClusterFuzzLite] Support GCB and gsutil/gcs as filestore. (#6629) 2021-10-27 10:00:04 -04:00
.gitattributes Add .gitattributes to specify LF as .sh line terminator (#7648) 2022-05-02 10:12:06 -04:00
.gitignore infra: add vscode extension poc (#10592) 2023-08-28 10:51:45 +01:00
.pylintrc Replace terms that are uninclusive. (#5045) 2021-01-25 08:41:34 -08:00
.style.yapf [infra] Add presubmit script (#3196) 2020-01-10 10:19:42 -08:00
CONTRIBUTING.md Delete unnecessary files and fix format in some MD pages (#4115) 2020-07-16 15:27:29 -07:00
LICENSE
README.md Update README.md (#11643) 2024-02-29 13:06:10 -05:00

README.md

OSS-Fuzz: Continuous Fuzzing for Open Source Software

Fuzz testing is a well-known technique for uncovering programming errors in software. Many of these detectable errors, like buffer overflow, can have serious security implications. Google has found thousands of security vulnerabilities and stability bugs by deploying guided in-process fuzzing of Chrome components, and we now want to share that service with the open source community.

In cooperation with the Core Infrastructure Initiative and the OpenSSF, OSS-Fuzz aims to make common open source software more secure and stable by combining modern fuzzing techniques with scalable, distributed execution. Projects that do not qualify for OSS-Fuzz (e.g. closed source) can run their own instances of ClusterFuzz or ClusterFuzzLite.

We support the libFuzzer, AFL++, and Honggfuzz fuzzing engines in combination with Sanitizers, as well as ClusterFuzz, a distributed fuzzer execution environment and reporting tool.

Currently, OSS-Fuzz supports C/C++, Rust, Go, Python, Java/JVM, and JavaScript code. Other languages supported by LLVM may work too. OSS-Fuzz supports fuzzing x86_64 and i386 builds.

Overview

OSS-Fuzz process diagram

Documentation

Read our detailed documentation to learn how to use OSS-Fuzz.

Trophies

As of August 2023, OSS-Fuzz has helped identify and fix over 10,000 vulnerabilities and 36,000 bugs across 1,000 projects.

Blog posts