Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/oss-fuzz/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
# OSS-Fuzz build container for the GayHydra decompiler harnesses.
# See docs/security/OSS_FUZZ.md.
# See https://codeberg.org/CryptoJones/GayHydra/src/branch/master/docs/security/OSS_FUZZ.md.

FROM gcr.io/oss-fuzz-base/base-builder

Expand Down
25 changes: 25 additions & 0 deletions .github/oss-fuzz/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# `.github/oss-fuzz/` — staging directory for OSS-Fuzz upstream submission

This directory holds the three files that get copied verbatim to
`projects/ghidra-decompiler/` in [google/oss-fuzz](https://github.com/google/oss-fuzz):

- [`project.yaml`](project.yaml) — OSS-Fuzz manifest (contacts, sanitizers, engines)
- [`Dockerfile`](Dockerfile) — build container definition
- [`build.sh`](build.sh) — harness build script

See [`docs/security/OSS_FUZZ.md`](../../docs/security/OSS_FUZZ.md) for the
broader integration plan and the in-tree harness sources at
`Ghidra/Features/Decompiler/src/decompile/cpp/fuzz/`.

## Sync workflow

Files here are kept byte-identical with their upstream counterparts at
[`google/oss-fuzz/projects/ghidra-decompiler/`](https://github.com/google/oss-fuzz/tree/master/projects/ghidra-decompiler).
Editing in either location requires copying to the other in the same
sweep so the two don't drift.

The Google-style `Copyright YYYY Google LLC` Apache 2.0 header on
`Dockerfile` and `build.sh` is the OSS-Fuzz convention for everything
under `projects/` — `dpebot`'s `header-check` bot enforces it on every
PR to google/oss-fuzz. Carrying the same header in-tree keeps the
`cp`-to-upstream operation a one-step sync rather than a diff-and-fix.
17 changes: 16 additions & 1 deletion .github/oss-fuzz/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
#!/bin/bash -eu
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
# OSS-Fuzz build script for the GayHydra decompiler harnesses.
# See docs/security/OSS_FUZZ.md.
# See https://codeberg.org/CryptoJones/GayHydra/src/branch/master/docs/security/OSS_FUZZ.md.

CPP_DIR="$SRC/ghidra/Ghidra/Features/Decompiler/src/decompile/cpp"
FUZZ_DIR="$CPP_DIR/fuzz"
Expand Down
12 changes: 7 additions & 5 deletions .github/oss-fuzz/project.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# OSS-Fuzz project manifest.
# OSS-Fuzz project manifest for GayHydra, a maintained fork of NSA's
# Ghidra reverse engineering platform. Fuzzes the decompiler's C++
# parsers (XML + PackedDecode) — first thing user-controlled input
# hits, historically the source of OOB-read CVEs in Ghidra's
# decompiler core.
#
# To go live: copy this file (plus Dockerfile and build.sh in this
# directory) to projects/ghidra-decompiler/ in google/oss-fuzz.
#
# See docs/security/OSS_FUZZ.md.
# See https://codeberg.org/CryptoJones/GayHydra/src/branch/master/docs/security/OSS_FUZZ.md
# for the in-tree harness sources and rationale.

homepage: "https://codeberg.org/CryptoJones/GayHydra"
main_repo: "https://codeberg.org/CryptoJones/GayHydra"
Expand Down
Loading