Integer overflow affecting allocation or bounds
Input-derived arithmetic wraps or overflows so the checked size, allocation size, and later operation refer to different effective values.
Candidate CWE: CWE-190
Test hypothesis#
Trace counts/offsets through type conversions and arithmetic to the allocation/index consumer. Use boundary-sized logical values with small local fixtures. Apply UBSan and appropriate additional integer checks, remembering unsigned wrap is defined and outside the default undefined group.
Evidence required#
Input value, operand widths/signedness, operation, resulting allocation/index, sanitizer or traced consequence, and fixed checked-arithmetic control. Arithmetic behavior alone does not establish a security impact.
Rule out false positives#
Intentional modular arithmetic, later bounds checks, unreachable lengths due to validated format constraints, or an overflow warning with no unsafe consumer.
Playbook and command references#
- Libraries and parsers: bounded fuzzing to a minimal reproducer — Build a realistic local harness, instrument the target, bound fuzzing resources, and turn unique faults into defensible library or consumer reports.
- Source review: entry point to protected operation — Trace attacker control and authorization through handlers, services, queues, and sensitive operations; promote only reachable violations of a stated invariant.
Find the associated command snippets
Referenced by these target playbooks#
Report checklist#
- Capture the affected version, configuration, identities, and object ownership.
- Preserve a valid baseline and a negative control.
- Reproduce the forbidden data access, action, or state change on controlled fixtures.
- Explain the intended security rule and why the observed behavior violates it.
- State prerequisites, uncertainty, cleanup, and the smallest demonstrated impact.
Conditional ATT&CK mapping#
No direct ATT&CK mapping selected. Record the weakness and demonstrated impact without forcing an adversary-behavior classification. See the mapping guide.