Pointer Arithmetic Bounds Checking for Non-Adjacent Overflow Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing memory bounds checking mechanisms introduce substantial overhead during pointer dereferencing and fail to effectively prevent non-adjacent overflows by performing checks only at dereference time, missing vulnerabilities that skip far past buffer ends.

Innovation Solution

A three-pronged approach to memory bounds checking during pointer arithmetic, including generating faults for pointers straying beyond allocation bounds, poisoning pointers near bounds, and faulting on dereferencing poisoned pointers, to enhance efficiency and accuracy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If bounds checks are performed at pointer dereference time, then memory safety is maintained, but substantial overhead is introduced

Engineering Contradiction:
Improvememory safetyVSAvoidbounds checking overhead
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent performs bounds checking during pointer arithmetic operations (addition, subtraction, comparison) before the actual pointer dereference occurs. This preliminary action identifies and prevents out-of-bounds pointers early in the execution flow, avoiding the need for repeated checks at each dereference point and reducing overall overhead while maintaining memory safety

Inventive Principle:
Principle #10Preliminary action

2Device complexity

If bounds checks are performed only at dereference time, then implementation simplicity is maintained, but non-adjacent overflows are not detected

Engineering Contradiction:
Improvechecking mechanism complexityVSAvoidoverflow detection coverage
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent introduces poison pointers as an intermediary mechanism between pointer arithmetic and dereference operations. When pointer arithmetic produces an out-of-bounds result, the pointer is marked as poisoned rather than immediately generating a fault. This intermediary approach enables detection of non-adjacent overflows that would otherwise skip past buffer ends, while maintaining relative simplicity through the use of existing pointer infrastructure

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If pointer arithmetic is instrumented with bounds checking, then non-adjacent overflows are prevented, but device complexity increases

Engineering Contradiction:
Improveoverflow preventionVSAvoidpointer arithmetic instrumentation
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies different checking strategies to different pointer states and operations. Poison pointers are used specifically for detecting non-adjacent overflows during arithmetic operations, while traditional bounds checking remains active for dereference operations. This localized application of different quality checks prevents unnecessary complexity in areas where simpler checks suffice, while enhancing security where needed

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS12487822B2Apparatus, computer-readable medium, and method for reducing bounds checking overhead by instrumenting pointer arithmetic
Publication Date: 2025.12.02 INTEL CORP
  • US12487822B2 patent drawing
  • US12487822B2 patent drawing
  • US12487822B2 patent drawing

AI summary

Methods, apparatus, systems, and articles of manufacture are disclosed that perform bounds checking on authorized memory allocations during pointer arithmetic. In some examples, instruction decode circuitry decodes an update pointer instruction for a pointer. In some examples, bounds checking circuitry determines an authorized allocation for the pointer, determines one or more exclusion zones and poison zones for the pointer. In some examples, bounds checking circuitry updates the pointer and generates a fault if the pointer points to one of the exclusion zones and poisons the pointer if the pointer points to one of the poison zones.