buffer underflow

What is a buffer underflow?

A buffer underflow, also known as a buffer underrun or a buffer underwrite, is when the buffer -- the temporary holding space during data transfer -- is fed data at a lower rate than it is being read from.

Buffer underflow errors occur when the flow of data from the original source, typically the hard drive, is interrupted long enough for the buffer to empty itself. As a result, the program or device reading from the buffer pauses. This can cause the writing action to stop, and the program or device receiving the data may be ruined.

Devices or data can suffer serious side effects when the buffer reading action encounters start-stop interruptions due to low speeds. The larger the buffer is, the less likely a buffer underflow will take place or that the transfer will be unsuccessful. For example, a buffer of 10 bits would protect against an interruption of up to 10 seconds before failing while a buffer of 60 bits would cover up to a minute.

While not always a security issue, buffer underflows can create exploitable vulnerabilities and be used to cause a denial-of-service attack, result in data loss and enable remote code execution.

A buffer underflow is the opposite of a buffer overflow, which occurs when the amount of data fed into a buffer exceeds the buffer's capacity.

What causes a buffer underflow?

Buffer underflows are often caused by broken connections, interrupted physical links or high bandwidth competition.

The error is a common problem when data is burned to a CD. Recording data to a CD must be performed in a real-time, nonstop process. If a computer is not supplying data quickly enough and the signal is interrupted, the CD will not record the data properly.

How to fix a buffer underflow

The following are common ways to fix buffer underflow conditions:

  • Increase the size of the buffer.
  • Perform hard drive defragmentation before burning to an external device.
  • Back up the data being transferred before writing.
  • Avoid burning data onto a device over a network.
  • Use hard drive scanning software to identify corrupted files before attempting an export.
  • Check CPU and hard drive speed requirements to ensure there is enough RAM and hard disk space to complete the task.
  • Make sure the device being written to functions properly.

Editor's note: This article was written by Sarah Lewis in 2018. TechTarget editors revised it in 2022 to improve the reader experience.

This was last updated in November 2022

Continue Reading About buffer underflow

Dig Deeper on Threats and vulnerabilities

Enterprise Desktop
Cloud Computing