top of page
Writer's pictureNidhi Nemani

What is Buffer Overflow?

A Buffer is a momentary area for Data Storage. When more data is put up by a program or system process, the additional data overflows. It causes some of that data to leak out into other buffers, which can corrupt or overwrite whatever data they were holding. In simple terms Buffer Overflow occurs when volume of data exceeds the storage capacity of Memory Buffer. Buffer Overflow is also known as Buffer Overrun. As a result, the program attempting to write the data to the buffer overwrites adjacent memory locations. In a buffer-overflow attack, the additional data sometimes holds certain instructions for actions intended by a hacker. Example – A buffer for log-in credentials may be designed to expect Username/ ID and password inputs of 8 units, so if a transaction involves an input of 10 units ( i.e 2 units more than expected), the program may write the excess data past the buffer boundary. Buffer overflows can affect all types of software. They typically result from malformed inputs or fail to allocate enough space for the buffer. If the transaction overwrites executable code, it can cause the program to behave randomly and generate incorrect results, memory access errors, or crashes.

Buffer Overflow Attack: Attackers exploit buffer overflow problem by overwriting the memory of an application. This changes the execution path of the program, activating response that damages files or exposes private information. For example, an attacker may introduce extra code, sending new instructions to the application to gain access to IT systems. If attackers know the memory design of a program, they can intentionally feed input that the buffer cannot hoard, and overwrite areas that hold executable code, replacing it with their own code. Types of Buffer Overflow Attacks - 1. Stack-based buffer overflows are more typical, and leverage stack memory that only exists during the execution time of a function. 2. Heap-based attacks are harder to carry out and involve flooding the memory space allocated for a program beyond memory used for current run time operations. 3. Integer overflow attack - In an integer overflow, an arithmetic operation results in whole number that is too large for the integer type meant to store it; this can result in a buffer overflow.

4. Unicode overflow - A unicode overflow creates a buffer overflow by inserting unicode characters into an input that expect ASCII characters. (ASCII and unicode are encoding standards that let computers represent text.


Although , Computers relies mainly on two different memory allocation that is Stack and Heap models because they both live in Computer’s RAM.


Recent Posts

See All

Comments


bottom of page