From the course: CompTIA Advanced Security Practitioner (CASP+) (CAS-004) Cert Prep

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Buffer overflows

Buffer overflows

- In this lesson, we're going to discuss buffer overflows. A buffer overflow occurs when a process in a program stores data outside the memory range that's allocated by the developer. This memory range is known as a buffer, and a buffer is simply a temporary storage area that a program uses to store its data. To better help understand this concept, let's use an illustration. Let's pretend that you have a glass of water sitting on a table that can hold a certain amount of water. For example, let's say we have a cup that's designed to hold 16 ounces of liquid, but you try to put in 20 ounces. What's going to happen? Well, our cup is going to overflow with water, and our table is going to get soaking wet. Now, in this illustration, the glass is our buffer or our allocated range of memory that we can use to hold data. And if we overflow it with data, in this illustration, our water, that means that extra data is going to spill out onto the table and make a huge mess. Similarly, in the…

Contents