Skip to content
Back to skills

Detecting Integer Overflow

ASecurity

Detects integer overflow and underflow vulnerabilities in arithmetic operations used for buffer sizing or allocation. Use when analyzing calculations, size computations, or investigating integer wraparound issues.

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

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill detecting-integer-overflow --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Detecting Integer Overflow?

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

Security grade badge for Detecting Integer Overflow
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-detecting-integer-overflow/badge)](https://www.skillsdirectory.com/skills/majiayu000-detecting-integer-overflow)

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-integer-overflow
description: Detects integer overflow and underflow vulnerabilities in arithmetic operations used for buffer sizing or allocation. Use when analyzing calculations, size computations, or investigating integer wraparound issues.
---

# Integer Overflow Detection

## Detection Workflow

1. **Identify arithmetic operations**: Find addition, multiplication, subtraction, bit shifts on user-controlled values
2. **Check for overflow protection**: Look for overflow checks before arithmetic, safe arithmetic functions, type conversions
3. **Trace to critical uses**: Follow results to memory allocation sizes, buffer copy lengths, loop bounds, array indices
4. **Assess impact**: Can overflow cause buffer overflow? Bypass security checks? Cause logic errors?

## Key Patterns

- Addition/multiplication without overflow checks
- Subtraction that could underflow
- Integer overflow affecting malloc size
- Loop counter overflow

## Output Format

Report with: id, type (addition/multiplication/underflow), severity, confidence, location, operation, operands, result used for, overflow check status, exploitability, impact, mitigation.

## Severity Guidelines

- **HIGH**: Overflow affects memory allocation size
- **MEDIUM**: Overflow affects loop bounds or array indices
- **LOW**: Overflow with limited security 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.