Category: 

What Is a Buffer Overflow?

Article Details
  • Written By: T.S. Adams
  • Edited By: M. C. Hughes
  • Last Modified Date: 15 November 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
Although they mainly functioned as downspouts, gargoyles were also intended to scare people into attending church.  more...

December 3 ,  1989 :  The Cold War officially ended.  more...

A buffer overflow occurs when a program is trying to write to a buffer and steps outside its boundaries, resulting in the program's writing information to memory that potentially belongs to another program. This violates the integrity of memory within the operating system, resulting in a serious error and potential crash for the executing program. The major danger of a buffer overflow comes from two major elements. First, the information written outside the buffer is ostensibly "lost," as the computer's memory map — its list of memory locations — cannot account for it. Second, a buffer overflow can accidentally overwrite information stored in memory for another program, effectively interfering with the execution of another program as well.

A "buffer" is a region of memory used as a temporary storage location while the computer is transferring information from one point to another. The most common use of a buffer is typically in video or audio playback, where the computer cues up an additional X seconds of footage or audio in memory, ensuring that playback will not be interrupted if something goes temporarily amiss on the system. A buffer exists only within a specific, predetermined location within the computer's memory, much like a country only exists within the boundary lines drawn on a map. Stepping outside these virtual "lines" results in problems not only for the program running, but for other programs on the system.

Ad

Essentially, the program has stepped outside its assigned jurisdiction and has invaded the space of another working program. Once this happens, the information written outside the buffer effectively falls off the computer's map; in other words, the system no longer has any way to retrieve it. Since the computer only "knows" to search for buffered information within the specific buffer space allocated in memory, it has no way to figure out where the overflowed information has gone.

In addition to this, a buffer overflow has the potential to disrupt other programs running on the computer. Imagine that the memory storage space on either side of the buffer has already been assigned to other running programs. Once the information in the buffer bleeds past its designed area, it will overwrite and corrupt any information already stored in those sections of memory. Therefore, a buffer overflow is a problem that can undermine the efficacy of an adjacent program as well as corrupting its own operation.

Ad

You might also Like

Recommended

Discuss this Article

Post your comments

Post Anonymously

Login

username
password
forgot password?

Register

username
password
confirm
email