Skip to main content

AddressSanitizer

Skill Active

AddressSanitizer detects memory errors during fuzzing. Use when fuzzing C/C++ code to find buffer overflows and use-after-free bugs.

Purpose

To enable developers to effectively use AddressSanitizer for finding memory corruption bugs in C/C++ code during fuzzing and testing.

Features

  • Detects memory errors like buffer overflows and use-after-free
  • Integrates with C/C++ compilation toolchains (Clang/GCC)
  • Configurable runtime options via environment variables
  • Provides step-by-step integration guides for fuzzers (libFuzzer, AFL++, cargo-fuzz)
  • Includes troubleshooting for common ASan issues

Use Cases

  • Fuzzing C/C++ code to find memory safety vulnerabilities
  • Debugging crashes related to memory corruption
  • Enhancing unit test suites with memory error detection
  • Improving the security posture of C/C++ projects

Non-Goals

  • Applying ASan in production environments due to performance overhead
  • Fuzzing pure safe languages without FFI or platforms with limited ASan support (Windows, macOS)
  • Replacing fundamental fuzzing techniques or harness writing
  • Detecting non-memory-related bugs

Workflow

  1. Compile C/C++ code with AddressSanitizer flags (`-fsanitize=address`)
  2. Configure ASan runtime behavior using `ASAN_OPTIONS` environment variable
  3. Run the instrumented program or fuzzer
  4. Analyze ASan's detailed error reports when memory errors are detected
  5. Adjust fuzzer memory limits if necessary for ASan's virtual memory requirements

Trust

  • warning:Issues Attention13 issues opened, 4 closed in the last 90 days, indicating a low closure rate and slow maintainer response.

Installation

First, add the marketplace

/plugin marketplace add trailofbits/skills
/plugin install testing-handbook-skills@trailofbits

Quality Score

85 /100
Analyzed about 13 hours ago

Trust Signals

Last commit3 days ago
Stars5.2k
LicenseCC-BY-SA-4.0
Status
View Source

© 2025 SkillRepo · Find the right skill, skip the noise.