역사상 최악의 소프트웨어 버그

Posted at 2008/09/26 14:24 // in Programming // by Daniel
http://www.wired.com/software/coolapps/ ··· %2F69355

2005년 기사입니다만,
소프트웨어 안정성이 얼마나 중요한지 다시 생각할 수 있는 내용입니다.
저는 원래 기계 신봉자라, (탱크 로켓 이런 걸 엄청 좋아했죠) 기계는 잘못할 수 가 없다는 믿음을 가졌었는데,
원자력 발전소 제어쪽 프로그램을 하다보니, 꼭 그런 건 아니구나 하는 깨달음이 있었습니다.
컴퓨터도 실수를 합니다. 그리고 그보다 수백배 더, 그걸 운용하는 사람과 그걸 만드는 프로그래머가 실수를 합니다.
요즘엔 프로그램이 정말 많이 사용됩니다. 몇년전부터 휴대폰의 소프트웨어 개발비가 하드웨어 개발비를 초과하기 시작한 걸로 알고 있고 전체 비용에서 비율이 기하급수적으로 늘고 있습니다.
그만큼 버그의 위험이, 그리고 그로 인한 재난의 발생 확률이 높아지는 거지요.
일부를 번역해봤습니다.

Last month automaker Toyota announced a recall of 160,000 of its Prius hybrid vehicles following reports of vehicle warning lights illuminating for no reason, and cars' gasoline engines stalling unexpectedly. But unlike the large-scale auto recalls of years past, the root of the Prius issue wasn't a hardware problem -- it was a programming error in the smart car's embedded code. The Prius had a software bug.

지난달(그러니까 2005년)에 16만대를 리콜한 도요타의 프리우스, 엔진이 갑자기 꺼지고 경고등이 이유없이 켜지는 등의 현상이었다. 이번 경우엔 소프트웨어 문제였다. 프리우스가 소프트웨어 버그가 있었던 것이다.

July 28, 1962 -- Mariner I space probe. A bug in the flight software for the Mariner 1 causes the rocket to divert from its intended path on launch. Mission control destroys the rocket over the Atlantic Ocean. The investigation into the accident discovers that a formula written on paper in pencil was improperly transcribed into computer code, causing the computer to miscalculate the rocket's trajectory.

화성탐사선 마리너 1호 얘깁니다. 4분만에 대서양으로 추락.

문제의 원인은 이렇다 저렇다 말이 많다고 하는데, 공통점은 소프트웨어 버그였으며 포트란 코드에서 한 글자를 잘못 써서, 궤도 계산이 지속적으로 발산하는 바람에 일어났고 엄청난 손실을 입었습니다.

1982 -- Soviet gas pipeline. Operatives working for the Central Intelligence Agency allegedly (.pdf) plant a bug in a Canadian computer system purchased to control the trans-Siberian gas pipeline. The Soviets had obtained the system as part of a wide-ranging effort to covertly purchase or steal sensitive U.S. technology. The CIA reportedly found out about the program and decided to make it backfire with equipment that would pass Soviet inspection and then fail once in operation. The resulting event is reportedly the largest non-nuclear explosion in the planet's history.

소련 가스 파이프라인 사고입니다. 이 파이프라인에 캐나다제 제어 시스템을 수입했는데 CIA에서 기술 유출로 단정하고 버그를 심었답니다. 핵폭발 이외의 가장 큰 폭발 사고.

1985-1987 -- Therac-25 medical accelerator. A radiation therapy device malfunctions and delivers lethal radiation doses at several medical facilities. Based upon a previous design, the Therac-25 was an "improved" therapy system that could deliver two different kinds of radiation: either a low-power electron beam (beta particles) or X-rays. The Therac-25's X-rays were generated by smashing high-power electrons into a metal target positioned between the electron gun and the patient. A second "improvement" was the replacement of the older Therac-20's electromechanical safety interlocks with software control, a decision made because software was perceived to be more reliable.

What engineers didn't know was that both the 20 and the 25 were built upon an operating system that had been kludged together by a programmer with no formal training. Because of a subtle bug called a "race condition," a quick-fingered typist could accidentally configure the Therac-25 so the electron beam would fire in high-power mode but with the metal X-ray target out of position. At least five patients die; others are seriously injured

Therac-25 엑스레이
이전의 20 버전에서 25로 업그레이드했는데 안전장치(safety interlock)를 소프트웨어로 교체함. 소프트웨어에 "race condition"(간단히 설명하면 어느쪽이 먼저 했냐에 따라 결과 값이 달라짐) 버그가 있는 걸 몰랐고 결과적으로 대량의 방사선을 누출하는 일이 생겨서 5명이 죽고 많은 사람이 다침.

1988 -- Buffer overflow in Berkeley Unix finger daemon. The first internet worm (the so-called Morris Worm) infects between 2,000 and 6,000 computers in less than a day by taking advantage of a buffer overflow. The specific code is a function in the standard input/output library routine called gets() designed to get a line of text over the network. Unfortunately, gets() has no provision to limit its input, and an overly large input allows the worm to take over any machine to which it can connect.

Programmers respond by attempting to stamp out the gets() function in working code, but they refuse to remove it from the C programming language's standard input/output library, where it remains to this day.

핑거 서비스 프로그램 버그. 그 유명한 버퍼 오버플로우 버그(문자열 버퍼등에 크기보다 더 많은 데이터를 보냄으로써 상대편 프로그램에 코드를 심을 수 있음)를 이용해 첫번째 인터넷 웜이 출현. 이 프로그램을 만든 모리스의 이름을 다서 모리스 웜이라고 불립니다. 당시 인터넷의 10%가 뚫려서 수천대의 서버가 다운되고 수십개 학교, 정부, 연구소가 공격당했습니다.
크리에이티브 커먼즈 라이센스
Creative Commons License

이 글에는 트랙백을 보낼 수 없습니다