Smashing the stack Flashcards

1
Q

buffer

A

contiguous block of computer memory that holds multileinstance of the same data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

arrays

A

variable in c

can be declared either static or dynamic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

static variables

A

allocated at load time on the data segment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

dynamic

A

dynamic variables are allocated at run time on the stack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

to overflow

A

to flow/fill over the top, brims or bounds

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

stack-based buffer overflows

A

overflow of dynamic buffers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

three regions to organize a process in memory

A

text, data, and stack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

text region

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

data region

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

new memory is added…

A

between the data and stack segments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is “a stack”

A

abstract data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

stack of objects property

A

las object placed on the stack will be the first obect removed– last in, first out queue- LIFO

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

PUSH operation

A

adds an element at the top of the stack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

POP operation

A

reduces the stack size by one by removing the last element at the top of the stack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

a procedure call…

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what does the stack do?

A

used to dynamically allocated the loca variables used in functions
to pass parameters to the functions
to return values from the function

17
Q

The stack region

A

a contiguous block of memory containing data.

18
Q

SP- stack pointer

A

a register that points to the top of the stack

19
Q

bottom of the stack

A

at a fixed address

20
Q

size of the stack

A

its size is dynamically adjusted by the kernel at run time

21
Q

what PUSHes and POPs

A

the CPU implements instruction to PUSH onto and POP off of the stack

22
Q

what does the stack consist of?

A

logical stack frames that are pushed when calling a function and popped when returning

23
Q

what is a stack frame?

A

a stack frame contains the parameters to a function, its local varaibles,a dn teh data necessary to recover the previous stack frame, including the value of the instruction poiner at the time of the function call

24
Q

how does the stack grow on many computers including INtel, motorola, sparc, and MIPS processors?

A

stack grows down towards lower memory addresses

25
Q

stack pointer can either point to

A

a) the last address on the stack

b) or the next free available address after the stack

26
Q

stack pointer (sP)

A

points to the top of the stack (lowest numericaladress)

27
Q

frame pointer (fp)

A

points to a fixed location within a frame

also known as local base pointer,