I found this on the net a while ago: Paul Bordeaux's personal compilation of top ten software bugs in the history. The #1 entry is totally amazing. Paul writes:
In 1983, Soviet early warning satellites picked up sunlight reflections off cloud-tops and mistakenly interpreted them as missile launches in the United States. Software was in place to filter out false missile detections of this very nature, but a bug in the software let the alerts through anyway. The Russian system instantly sent priority messages up saying that the United States had launched five ballistic missiles. Protocol in such an event was to respond decisively, launching the entire soviet nuclear arsenal before any US missile detonations could disable their response capability. The duty officer for the system, one Lt Col Stanislav Petrov, intercepted the messages and flagged them as faulty, stopping the near-apocalypse. He claimed that he had a “funny feeling in my gut” about the attack, and reasoned if the U.S. was really attacking they would launch more than five missiles.