Smashing the stack Flashcards
buffer
contiguous block of computer memory that holds multileinstance of the same data type
arrays
variable in c
can be declared either static or dynamic
static variables
allocated at load time on the data segment
dynamic
dynamic variables are allocated at run time on the stack
to overflow
to flow/fill over the top, brims or bounds
stack-based buffer overflows
overflow of dynamic buffers
three regions to organize a process in memory
text, data, and stack
text region
fixed by the program and includes code (instructions) and read-only data
corresponds to the text section of the executable file
normally marked read-only
attempts to write to it will result in a segmentation violation
data region
contains initialized and uninitialized data
stores static variables
corresponds to data-bss section of executable file
its size can be changed with the brk(2) system call
if xpansion of the bss data or the user stack exhausts available memory, proces is blocked and reschedule to runagain with larger memory space
new memory is added…
between the data and stack segments
what is “a stack”
abstract data type
stack of objects property
las object placed on the stack will be the first obect removed– last in, first out queue- LIFO
PUSH operation
adds an element at the top of the stack
POP operation
reduces the stack size by one by removing the last element at the top of the stack
a procedure call…
alters the flow of control like a jump
unline a jump, when finished performing its task, a function returns control to the statement or instruction following the call