Skip to content
Back to skills

Detecting Use After Free

ASecurity

Detects use-after-free vulnerabilities by identifying pointer dereferences after memory deallocation. Use when analyzing memory management, cleanup code, or investigating dangling pointer issues.

  • 666 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 8, 2026
business

Security analysis

A100/100

Scanned February 12, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Detecting Use After Free?

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

Security grade badge for Detecting Use After Free
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-detecting-use-after-free/badge)](https://www.skillsdirectory.com/skills/majiayu000-detecting-use-after-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-use-after-free
description: Detects use-after-free vulnerabilities by identifying pointer dereferences after memory deallocation. Use when analyzing memory management, cleanup code, or investigating dangling pointer issues.
---

# Use-After-Free Detection

## Detection Workflow

1. **Identify free operations**: Find all free(), realloc(), delete calls and note the pointer being freed
2. **Trace pointer usage**: Use `xrefs_to` to find all dereferences of the pointer
3. **Check control flow**: Analyze paths through code to identify usage after free
4. **Assess exploitability**: Can attacker control freed memory? Is there a useful use-after-free? Can memory be reallocated?

## Key Patterns

- Pointer dereference after free()
- Double free vulnerabilities
- Invalid pointer access after realloc()
- Reference counting issues

## Output Format

Report with: id, type, subtype, severity, confidence, location, freed pointer, free operation, use operation, use-after-free status, distance, exploitability, attack scenario, impact, mitigation.

## Severity Guidelines

- **CRITICAL**: Use-after-free with code execution
- **HIGH**: Use-after-free with data corruption
- **MEDIUM**: Use-after-free causing crashes
- **LOW**: Use-after-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.