🇰🇷 한글 설명
rust-openssl의 X509Ref::ocsp_responders 함수가 OpenSSL이 강제하지 않는 비ASCII 바이트를 포함한 OCSP 응답자 URL을 str::from_utf8_unchecked로 변환하여 UTF-8 불변성을 위반합니다. 이로 인해 안전한 Rust 코드에서 undefined behavior가 발생하며, 0.10.79 이상에서 수정됩니다.
💡 쉬운 설명
디지털 인증서에서 특수한 URL을 읽을 때, 잘못된 문자 인코딩으로 인해 프로그램이 예상치 못한 동작이나 크래시가 발생할 수 있습니다. rust-openssl을 0.10.79 이상으로 업그레이드하면 해결됩니다.
🇺🇸 원문 (English)
rust-openssl provides OpenSSL bindings for the Rust programming language. From 0.9.7 to before 0.10.79, X509Ref::ocsp_responders returns OCSP responder URLs from a certificate's AIA extension as OpensslString, whose Deref<Target = str> wraps the raw bytes with str::from_utf8_unchecked. OpenSSL does not enforce that the underlying IA5String is ASCII, so a certificate with non-UTF-8 bytes in its OCSP accessLocation causes safe Rust code to construct a &str that violates the UTF-8 invariant — resulting in undefined behavior. This vulnerability is fixed in 0.10.79.
📍 영향받는 시스템
rust-openssl 0.9.7 ~ 0.10.78
⚔️ 공격 벡터
특별히 제작된 인증서(OCSP accessLocation에 비UTF-8 바이트 포함)를 통해 대상 애플리케이션에서 undefined behavior 유발
🛡️ 대응 방법
rust-openssl을 0.10.79 이상으로 업그레이드
🔧 검증 코드
출력된 버전이 0.10.79 이상이면 취약점이 해결되었고, 그 미만이면 업그레이드 필요
grep 'openssl' Cargo.lock | grep -oP 'version = "\K[0-9.]+' | head -1