Skip to content
Back to skills

Detecting Double Free

ASecurity

Detects double free vulnerabilities by identifying attempts to free the same memory block twice. Use when analyzing memory management, cleanup paths, or investigating heap corruption issues.

  • 666 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 8, 2026
business

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill detecting-double-free --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Detecting Double Free?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Detecting Double Free
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-detecting-double-free/badge)](https://www.skillsdirectory.com/skills/majiayu000-detecting-double-free)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: detecting-double-free
description: Detects double free vulnerabilities by identifying attempts to free the same memory block twice. Use when analyzing memory management, cleanup paths, or investigating heap corruption issues.
---

# Double Free Detection

## Detection Workflow

1. **Identify free operations**: Find all free() and delete/delete[] calls, note the pointers being freed
2. **Track pointer usage**: Use `xrefs_to` to trace pointers and identify pointer aliases
3. **Analyze control flow**: Map all code paths to free(), check for multiple free() calls on same pointer
4. **Assess exploitability**: Can attacker trigger double free? Is there useful heap corruption?

## Key Patterns

- Direct double free: free() called twice on same pointer
- Conditional double free: free() in multiple code paths
- Indirect double free: freeing same memory through different pointers
- Reference counting issues

## Output Format

Report with: id, type, subtype, severity, confidence, location, freed pointer, first free, second free, double free path, exploitability, attack scenario, impact, mitigation.

## Severity Guidelines

- **CRITICAL**: Double free with code execution potential
- **HIGH**: Double free causing heap corruption
- **MEDIUM**: Double free causing crashes
- **LOW**: Double free with limited impact

## See Also

- `patterns.md` - Detailed detection patterns and exploitation scenarios
- `examples.md` - Example analysis cases and code samples
- `references.md` - CWE references and mitigation strategies

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.