cargo-fuzz

Run cargo-fuzz fuzzing campaigns on Rust projects with libFuzzer and AddressSanitizer.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/ofelixdev/cc-kit --skill cargo-fuzz-ofelixdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cargo-fuzz
Source: https://github.com/ofelixdev/cc-kit/tree/main/template/skills/cargo-fuzz
Command: npx skills add https://github.com/ofelixdev/cc-kit --skill cargo-fuzz-ofelixdev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires libfuzzer-sys, arbitrary, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a streamlined way to fuzz Rust projects managed with Cargo, helping to uncover memory errors and security vulnerabilities in your code.

Core Features & Use Cases

  • Integrated Fuzzing: Seamlessly integrates with Cargo for easy setup and execution of fuzzing campaigns.
  • Sanitizer Support: Automatically enables AddressSanitizer (ASan) for robust memory error detection.
  • Structure-Aware Fuzzing: Supports the arbitrary crate for fuzzing complex data structures.
  • Use Case: You've developed a Rust library for parsing a specific file format. Use this Skill to automatically generate malformed inputs that could crash your parser or expose security flaws.

Quick Start

Run cargo-fuzz to fuzz the target 'fuzz_target_1' in your Rust project.

Frequently Asked Questions about cargo-fuzz

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fuzz a Rust project to find memory safety issues?

You can fuzz Rust code by running cargo-fuzz to execute automated fuzzing campaigns that generate malformed inputs and leverage libFuzzer with AddressSanitizer to detect memory safety issues.

What is structure-aware fuzzing in Rust and how does it work?

Structure-aware fuzzing in Rust works by using the arbitrary crate to generate complex data structures, allowing the fuzzer to test parsers with valid yet malformed inputs rather than random byte sequences.

Can I use cargo-fuzz with my existing Cargo workspace?

Yes, cargo-fuzz integrates with Cargo to set up and execute fuzzing campaigns directly within your existing Rust project structure.

Does fuzzing Rust code automatically detect security vulnerabilities?

Fuzzing Rust code with cargo-fuzz automatically enables AddressSanitizer to detect memory errors, helping you uncover security vulnerabilities and crashes caused by malformed inputs.

Do I need the arbitrary crate to fuzz complex data structures in Rust?

Yes, you need the arbitrary crate to perform structure-aware fuzzing, allowing the fuzzer to generate and mutate complex data structures for your Rust codebase.

What is the best way to test a Rust file format parser for crashes?

The best way to test a Rust file format parser for crashes is using cargo-fuzz to automatically generate malformed inputs, leveraging AddressSanitizer to expose memory errors and security flaws.