An integer overflow happens when a calculation produces a number larger than the value a variable can store. The result wraps, truncates, or otherwise becomes unexpected. In secure software, that is dangerous because code may use the wrong value for a length, offset, allocation size, permission check, or array index.
Attackers look for integer overflows because they can weaken safety checks and help trigger memory corruption, logic bypasses, or privilege escalation. In a platform like the Android Framework, an overflow in privileged code can cross a boundary that app sandboxing is meant to protect. Defenders reduce risk with safe numeric types, bounds checks before arithmetic, compiler hardening, fuzzing, and code review focused on size calculations and conversions between signed and unsigned integers.



