# Exploiting Integer Overflow Vulnerabilities

Methodology for finding and exploiting integer overflow, underflow, truncation, and...

- Repository: https://github.com/xalgorix/xalgorix (1285 stars)
- Category: Security
- License: Apache-2.0
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add xalgorix/xalgorix --skill exploiting-integer-overflow-vulnerabilities -g -a claude-code -y`
Codex: `npx skills add xalgorix/xalgorix --skill exploiting-integer-overflow-vulnerabilities -g -a codex -y`
Cursor: `npx skills add xalgorix/xalgorix --skill exploiting-integer-overflow-vulnerabilities -g -a cursor -y`
Gemini CLI: `npx skills add xalgorix/xalgorix --skill exploiting-integer-overflow-vulnerabilities -g -a gemini-cli -y`

## Description

Methodology for finding and exploiting integer overflow, underflow, truncation, and signedness bugs in native code during authorized engagements, focusing on how wrapped arithmetic in size/length calculations leads to undersized allocations, oversized copies, length-check bypasses, and downstream heap/stack overflows.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Exploiting Integer Overflow Vulnerabilities

## When to Use

- During authorized assessments of native code (C/C++/Rust/Go) where attacker-controlled integers feed size, length,
  count, index, or offset calculations.
- When an allocation size is computed from arithmetic (`count * elem_size`, `len - header`, `size + padding`) that can
  wrap, producing an **undersized buffer** later written with the logical (un-wrapped) size, a classic
  integer-overflow-to-heap-overflow chain.
- When a length/bounds check uses a narrow type (e.g. 1-byte size field) that can be overflowed to bypass validation
  while the real copy uses a larger value.
- When signed/unsigned confusion causes a negative input to be treated as a huge positive size.

## Critical: Concepts/Steps Most Often Missed

The rest: https://github.com/xalgorix/xalgorix/blob/HEAD/internal/tools/skills/data/binary-exploitation/exploiting-integer-overflow-vulnerabilities/SKILL.md
