Out of Bounds Memory References
Out of Bounds Memory References
Memory
References
Definition
• Out-of-bounds memory references refer to
attempts to access memory locations that are
outside the bounds of a valid, allocated memory
region.
• This can lead to unpredictable behavior, including
crashes, data corruption, and security
vulnerabilities
• Out-of-bounds memory access happens when a
program tries to read from or write to a memory
address that it is not permitted to access.
Types
• Accessing beyond the allocated stack or heap
space
• Array or buffer overflows
• Accessing uninitialized or freed memory
• Accessing invalid pointers
Accessing beyond the
allocated stack or heap
space
• Stack and heap are two major areas of memory that
programs use to store local variables, function calls,
dynamic memory, etc.
• If an instruction attempts to reference memory that
lies outside of these allocated regions (e.g., accessing
data beyond the stack frame or after deallocating
memory in the heap), it can result in out-of-bounds
access.
Array or buffer overflows