SpaceFuzz
Continuous fuzzing of open-source NASA flight software, with crashes reported through coordinated disclosure
Role
Solo Security Researcher
Duration
Ongoing
Tech Stack
8 technologies
About This Project
SpaceFuzz is continuous fuzzing of open-source NASA flight software, run as coordinated disclosure work. Spacecraft accept commands from the ground as raw bytes, and the code that turns those bytes into frames, packets, and files is the software's front door. SpaceFuzz aims libFuzzer at exactly that code, built with AddressSanitizer and UndefinedBehaviorSanitizer, starting with JPL's F Prime framework and extending to NASA's core Flight System (cFS).
There are six F Prime harnesses. They cover the basic deframer, the frame accumulator that finds frames in a byte stream, the full CCSDS TC uplink chain, the AOS deframer with spanning packets, the CFDP file-transfer engine, and the SDLS layer that decrypts and authenticates commands with AES-256-GCM. Each harness wires the components the way F Prime's own subtopologies do and drives them through their public ports. A few config bytes at the end of each input pick buffer sizes, allocation failures, and CRC or MAC fix-ups, so mutated frames get deep into the parser instead of bouncing off a checksum. The seventh harness feeds UDP datagrams into cFS's CI_LAB uplink app, compiling the real cFE message code unchanged and stubbing only the OS and bus plumbing.
The harnesses look for more than memory errors. Every buffer has to come back exactly once, leaks and double releases abort the run, and the SDLS harness checks that nothing it did not seal correctly ever gets through the decryption layer. The CFDP harness writes received files for real inside a sandbox and fails if an uplinked file name escapes it. To show the approach finds real bugs, a rediscovery benchmark rebuilds the harnesses against F Prime commits from before published fixes. It finds a known heap overflow (GHSA-qr35-hwjp-44fq) within seconds.
Findings are reproduced on a pinned commit with the crashing input and sanitizer trace, then reported only through each project's official channel: F Prime's private security advisories and NASA's vulnerability disclosure program. Details stay private until the maintainers publish.
Key Features
- ◆Six F Prime harnesses covering the deframer, frame accumulator, CCSDS AOS and TC uplink chains, the CFDP file-transfer engine, and the SDLS decryption layer
- ◆A seventh harness drives NASA's core Flight System through its CI_LAB UDP uplink path into the software bus and command handlers
- ◆Components are wired exactly as F Prime's own ComCcsds subtopologies wire them and driven through their real port objects, so every crash is reachable from the uplink
- ◆Every input is copied into an exact-size heap buffer and FW_ASSERT is forced to abort, so out-of-bounds reads and reachable assertions both surface as crashes
- ◆Oracles beyond the sanitizers: buffer-leak and double-release checks, and for the AES-GCM SDLS layer, a rule that nothing the harness did not seal correctly may get through
- ◆The CFDP harness writes received files for real inside a sandbox and aborts if an uplinked file name ever escapes it
- ◆32-bit builds of every harness, since many flight targets are 32-bit
- ◆Continuous fuzzing on every PR via ClusterFuzzLite in GitHub Actions
Challenges
Driving flight-software components without their runtime threads, by calling handlers through the same tester hooks F Prime's unit tests use
Getting mutated inputs past CRCs and AES-GCM authentication tags without weakening the code under test, using config bytes that re-seal or fix up each frame
Keeping fuzzed file names away from the host by wrapping F Prime's file-system calls at link time and confining them to a fixed-length sandbox path
Separating real bugs from harness artifacts: a cFS crash only counts once the same datagrams crash the full stock bundle, built with sanitizers, over UDP
Outcomes
- ✓Tens of millions of executions across the F Prime uplink chains, with coverage tracked per harness
- ✓A rediscovery benchmark proves the harnesses find real bugs: built against F Prime commits from before published fixes, the AOS harness rediscovers a known FW_ASSERT abort within 2 seconds and the GHSA-qr35-hwjp-44fq heap overflow within 13 seconds
- ✓Every finding is reproduced on a pinned commit with its crashing input and sanitizer trace before it is reported, through F Prime's private security advisories or NASA's vulnerability disclosure program, never as a public issue
Tech Stack
Want to talk about this project?
Questions, collaboration, or overlapping research: send a raven.
Get in Touch