Crash (computing)

A public payphone that has experienced a fatal error causing a crash and is displaying the Blue Screen of Death.

A crash (or system crash) in computing is when a computer program, such as a software application or an operating system, stops functioning properly. Often the program will exit after encountering this type of error. The program responsible may appear to hang until a crash reporting service reports the crash and any details relating to it. If the program is a critical part of the operating system, the entire system may crash, often resulting in a kernel panic or fatal system error.

Most crashes are the result of executing invalid machine instructions. Typical causes are when the program counter is set to an incorrect address or a buffer overflow overwrites a portion of the affected program code due to an earlier bug. In either case, this results in the software instructing the CPU to access random data values in memory. Since all data values are possible to select but not always valid to request, this often results in an illegal instruction exception. The original software bug that started this chain of events is typically considered to be the cause of the crash, which is discovered through the process of debugging. This is often far from obvious, as the original bug can be far removed from the event of the crash and appear to be perfectly valid code.

In earlier personal computers, it was possible to cause hardware damage through attempting to write data to hardware addresses outside of the system's main memory. Some crashes are exploitable and allow a malicious program or hacker to execute arbitrary code allowing for the replication of viruses or the acquisition of data which would normally be inaccessible.

Application crashes

A display at Frankfurt Airport running a program under Windows XP that has crashed due to a memory read access violation

An application typically crashes when it performs an operation which is not allowed by the operating system. The operating system then triggers an exception or signal in the application. Unix applications traditionally responded to the signal by dumping core. Most Windows and Unix GUI applications respond by displaying a dialogue box (such as the one shown to the right) with the option to attach a debugger if one is installed. Some applications attempt to recover from the error and continue running instead of exiting.

Typical errors that result in application crashes include:

Web server crashes

The software running the web server behind a website may crash, rendering it inaccessible entirely or providing only an error message instead of normal content.

For example: if a site is using an SQL database (such as MySQL) for a script (such as PHP) and that SQL database server crashes, then PHP will display a connection error.

Operating system crashes

An operating system crash commonly occurs when a hardware exception occurs that cannot be handled. Operating system crashes can also occur when internal sanity-checking logic within the operating system detects that the operating system has lost its internal self-consistency.

Modern multi-tasking operating systems, such as Windows NT, Linux, and Mac OS X usually remain unharmed when an application program crashes.

Security implications of crashes

Many software bugs which cause crashes are also exploitable for arbitrary code execution and other types of privilege escalation.[1][2] For example, a stack buffer overflow can overwrite the return address of a subroutine with an invalid value, which will cause a segmentation fault when the subroutine returns. However, if an exploit overwrites the return address with a valid value, the code in that address will be executed.

See also


  1. "Analyze Crashes to Find Security Vulnerabilities in Your Apps". 2007-04-26. Retrieved 2014-06-26.
  2. "Jesse Ruderman » Memory safety bugs in C++ code". 2006-11-01. Retrieved 2014-06-26.
Wikimedia Commons has media related to Computer errors.
This article is issued from Wikipedia - version of the 11/22/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.