fuzzing obstacles

Other Community

Skill notes

Overview

Many real-world programs were not designed with fuzzing in mind. They may: Verify checksums or cryptographic hashes before processing input Rely on global state (e.g., system time, environment variables) Use non-deterministic random number generators Perform complex validation that makes it difficult for the fuzzer to generate valid inputs

Key Concepts

Concept · Description SUT Patching · Modifying System Under Test to be fuzzing-friendly Conditional Compilation · Code that behaves differently based on compile-time flags Fuzzing Build Mode · Special build configuration that enables fuzzing-specific patches False Positives · Crashes found during fuzzing that cannot occur in production

When to Apply

Apply this technique when: The fuzzer gets stuck at checksum or hash verification Coverage reports show large blocks of unreachable code behind validation Code uses time-based seeds or other non-deterministic global state Complex validation makes it nearly impossible to generate valid inputs

Quick Reference

Task · C/C++ · Rust Check if fuzzing build · #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION · cfg!(fuzzing) Skip check during fuzzing · #ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION return -1; #endif · if !cfg!(fuzzing) { return Err(...) } Common obstacles · Checksums, PRNGs, time-based logic · Checksums, PRNGs, time-based logic Supported fuzzers · libFuzzer, AFL++, LibAFL, honggfuzz · cargo-fuzz, libFuzzer

Step 1: Identify the Obstacle

Run the fuzzer and analyze coverage to find code that's unreachable. Common patterns: Look for checksum/hash verification before deeper processing Check for calls to rand(), time(), or srand() with system seeds Find validation functions that reject most inputs Identify global state initialization that differs across runs

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
Other
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@trailofbits · no license declared
Token usage
Lean
Setup complexity
Guided setup
External API key
Not required
Operating systems
Unspecified (assume cross-platform)
Runtime requirements
No explicit requirements detected
Detected file/system behavior
  • Read-only
  • Write / modify
  • Shell exec
  • Env read
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

Output preview fuzzing-obstacles.preview
# Real-World Examples

**OpenSSL:** Uses `FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION` to modify cryptographic algorithm behavior. For example, in [crypto/cmp/cmp_vfy.c](https://github.com/openssl/openssl/blob/afb19f07aecc84998eeea56c4d65f5e0499abb5a/crypto/cmp/cmp_vfy.c#L665-L678), certain signature checks are relaxed during fuzzing to allow deeper exploration of certificate validation logic. **ogg crate (Rust):** Uses `cfg!(fuzzing)` to [skip checksum verification](https://github.com/RustAudio/ogg/blob/5ee8316e6e907c24f6d7ec4b3a0ed6a6ce854cc1/src/reading.rs#L298-L300) during fuzzing. This allows the fuzzer to explore

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.