As we can see memory still plays a big part when it comes to computer vulnerabilities. Buffer overflow takes place when too much data is accepted as input to a specific process within an allocated memory segments. A buffer can be overflowed arbitrarily with too much data, but for it to be of any use to an attacker, the code inserted into the buffer must be of a specific length, followed up by commands the attacker wants executed.
The purpose of a buffer overflow may be either to make a mess or insert scripts to take control of the system. There are two main types of memory buffer overflows, the stack overflow and the heap overflow. The presentation below will give you some idea of what a buffer overflow is and how it works.