Skip to content
Back to skills

Detecting Buffer Overflows

ASecurity

Detects stack and heap buffer overflow vulnerabilities in binary code by identifying unsafe memory operations. Use when analyzing buffer handling, string manipulation functions, or investigating memory corruption vulnerabilities.

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

Works with

  • mcp

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill detecting-buffer-overflows --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Detecting Buffer Overflows?

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

Security grade badge for Detecting Buffer Overflows
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-detecting-buffer-overflows/badge)](https://www.skillsdirectory.com/skills/majiayu000-detecting-buffer-overflows)

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-buffer-overflows
description: Detects stack and heap buffer overflow vulnerabilities in binary code by identifying unsafe memory operations. Use when analyzing buffer handling, string manipulation functions, or investigating memory corruption vulnerabilities.
---

# Buffer Overflow Detection

## Detection Workflow

1. **Identify dangerous function calls**: strcpy, strcat, sprintf, gets, memcpy without size checks
2. **Trace data flow**: Use `xrefs_to` from input sources (network, files, user input) to sinks
3. **Verify bounds checking**: For each copy operation, check if source size is validated and destination buffer is sufficient
4. **Assess exploitability**: Can attacker control overflow size? Is there controlled write to critical memory?

## Key Patterns

- Stack overflow: Unbounded copy to local buffer
- Heap overflow: Malloc followed by unchecked write
- Off-by-one: Loop condition or bounds check error
- Integer overflow leading to buffer overflow

## Output Format

Report with: id, type (stack/heap/static), severity, confidence, location, sink, source, buffer size, overflow potential, evidence, exploitability, mitigation.

## Severity Guidelines

- **CRITICAL**: Unbounded copy to stack buffer, attacker-controlled size
- **HIGH**: Bounded copy with insufficient checks, off-by-one errors
- **MEDIUM**: Potential overflow with limited attacker control
- **LOW**: Unlikely to be exploitable, theoretical only

## 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.