CyberKit

Off-by-One Error

A boundary mistake of one element that corrupts adjacent memory.

What it is

A bug where a loop or index is off by a single position, for example writing one byte past a buffer or omitting a terminating element. The single-element overshoot can still corrupt an adjacent pointer or length.

Why it matters

Off-by-one errors are subtle but exploitable, sometimes overwriting a single critical byte such as a metadata field or pointer's low byte. They are a reminder that even one-byte overflows are not safe to dismiss.

In practice

A loop iterates one too many times and writes a null byte over the least-significant byte of an adjacent saved pointer.

What to look for

  • Loops using <= where < was meant.
  • Buffers sized without room for a null terminator.
  • Single byte overwrites next to sensitive data.

Common mistake

Dismissing one byte as harmless. A single byte can change a pointer or length.

Practice it nearby

CyberKit has no tool for this term itself. These are the closest places to practice it.

In the field

Well-known tools where this shows up on the job. They are listed to show the landscape, not as a recommendation.

  • Nessus Commercial

    A vulnerability scanner that checks hosts for known flaws and missing patches.

  • Qualys VMDR Commercial

    A cloud platform that scans assets and ranks vulnerabilities for patching.

  • OpenVAS Open source

    An open source vulnerability scanner with a large set of checks.

  • Nuclei Open source

    Runs community templates that test for specific, newly published flaws.

Read next

Sources