Buffer Overflow Maddikayala jagadish CSCI 5931 Web Security
Buffer Overflow Maddikayala, jagadish. CSCI 5931 Web Security Prof. T. Andrew Yang Monday Feb. 23
What is Buffer Overflow? l l A buffer is a contiguous allocated chunk of memory, such as an array or a pointer in C Buffer overflow occurs when a program or process tries to store more data in a buffer than it was intended to hold Buffer overflows are exploited to change the flow of a program in execution Buffer overflows are by far the most commonly exploited bug on the linux/unix Operating systems CSCI 5931 Web Security
Process Memory Organization env, argv strings High addess. bss. data Heap char global; int main(){ char global = ‘a’; Char *var = malloc(3); …. int main(){ }… … env, argv pointers stack }} . data int main(){ static int var; to an address which var points int main(){ … is in the static charheap var = ‘a’; }… . text } globaland andvar varwillbe beinin. bss. data heap. bss Low address CSCI 5931 Web Security