🇰🇷 한글 설명
OpenSSL 1.0.2에서 SSL 핸드셰이크 실패 시 에러 상태 메커니즘이 SSL_read()/SSL_write() 호출에서 제대로 작동하지 않는 버그입니다. 이로 인해 암호화/복호화 없이 데이터가 직접 SSL/TLS 레코드 레이어에서 전송될 수 있습니다. 애플리케이션에서 치명적 에러 수신 후에도 계속 SSL_read()/SSL_write()를 호출하는 경우에만 악용 가능합니다.
💡 쉬운 설명
SSL/TLS 연결이 실패한 후에도 암호화되지 않은 상태로 데이터가 전송될 수 있는 버그입니다. 특정 애플리케이션의 에러 처리 미흡이 있을 때만 악용됩니다.
🇺🇸 원문 (English)
OpenSSL 1.0.2 (starting from version 1.0.2b) introduced an "error state" mechanism. The intent was that if a fatal error occurred during a handshake then OpenSSL would move into the error state and would immediately fail if you attempted to continue the handshake. This works as designed for the explicit handshake functions (SSL_do_handshake(), SSL_accept() and SSL_connect()), however due to a bug it does not work correctly if SSL_read() or SSL_write() is called directly. In that scenario, if the handshake fails then a fatal error will be returned in the initial function call. If SSL_read()/SSL_write() is subsequently called by the application for the same SSL object then it will succeed and the data is passed without being decrypted/encrypted directly from the SSL/TLS record layer. In order to exploit this issue an application bug would have to be present that resulted in a call to SSL_read()/SSL_write() being issued after having already received a fatal error. OpenSSL version 1.0.2b-1.0.2m are affected. Fixed in OpenSSL 1.0.2n. OpenSSL 1.1.0 is not affected.
📍 영향받는 시스템
OpenSSL 1.0.2b~1.0.2m (1.0.2n 이상, OpenSSL 1.1.0은 영향 없음)
⚔️ 공격 벡터
핸드셰이크 실패 후 애플리케이션이 SSL_read()/SSL_write() 계속 호출 시 암호화되지 않은 데이터 유출
🛡️ 대응 방법
OpenSSL 1.0.2n 이상으로 업그레이드하거나 1.1.0 이상으로 업그레이드
🔧 검증 코드
명령어가 버전을 출력하면 취약한 버전입니다. 출력 없으면 안전한 버전입니다.
openssl version | grep -E 'OpenSSL 1\.0\.2[b-m]'