libfuzzer

Fuzz C/C++ code with libFuzzer to uncover crashes and security issues.

Updated Jan 17, 2026
One-click install
npx skills add https://github.com/mejango/juicy-vision --skill libfuzzer-mejango
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: libfuzzer
Source: https://github.com/mejango/juicy-vision/tree/main/.claude/plugins/testing-handbook-skills/skills/libfuzzer
Command: npx skills add https://github.com/mejango/juicy-vision --skill libfuzzer-mejango

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides fuzzing of C/C++ code using libFuzzer, helping developers quickly uncover crashes and security issues by providing a complete setup, harness patterns, and workflow guidance.

Core Features & Use Cases

  • Coverage-guided fuzzing with libFuzzer integrated into the LLVM toolchain for C/C++ projects.
  • Step-by-step guidance on installation, harness creation, corpus management, and sanitizer usage.
  • Use Case: A single-project fuzzing workflow to validate a library that is compiled with clang and linked with libFuzzer.

Quick Start

Use this skill to scaffold a fuzz harness, build with -fsanitize=fuzzer, and start fuzzing a target function.

Frequently Asked Questions about libfuzzer

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

FAQPage Schema
How do I set up coverage-guided fuzzing for a C/C++ project using Clang?

Coverage-guided fuzzing in Clang requires compiling your C/C++ code with the -fsanitize=fuzzer flag and linking it with libFuzzer to enable deterministic crash discovery. You also need to write a fuzz harness to feed inputs to your target functions.

What is a fuzz harness and how do I create one for libFuzzer?

A fuzz harness is a lightweight C/C++ function that receives arbitrary byte data from libFuzzer and passes it to the target code you want to test. You create it by defining the LLVMFuzzerTestOneInput function, which accepts a pointer and size, then triggering your target logic.

Can I use sanitizers with libFuzzer to find security issues in C/C++ code?

Yes, you can use sanitizers with libFuzzer to find security issues by compiling with flags like -fsanitize=address alongside -fsanitize=fuzzer. This combination detects memory errors like buffer overflows and use-after-frees during fuzzing runs.

Does fuzzing with libFuzzer require the full LLVM toolchain?

Fuzzing with libFuzzer requires the Clang compiler because libFuzzer is integrated directly into the LLVM toolchain. You need Clang to apply the necessary build configurations and compiler flags for coverage instrumentation and sanitizer support.

How do I manage the fuzzing corpus when using libFuzzer?

Corpus management in libFuzzer involves specifying a directory to store seed inputs and evolved test cases that increase code coverage. The fuzzer automatically saves interesting inputs that trigger new execution paths into this corpus directory for future regression testing.

Why is my libFuzzer build not finding crashes in my C/C++ library?

If libFuzzer is not finding crashes, your harness might not be reaching deep code paths, or you may be missing sanitizer flags like -fsanitize=address. Ensure your build configuration includes both fuzzing and sanitizer instrumentation, and verify your harness passes data effectively.