🇰🇷 한글 설명
rust-openssl 라이브러리의 CipherCtxRef::cipher_update_inplace 함수에서 AES key-wrap-with-padding 암호 사용 시 출력 버퍼 크기를 잘못 계산하는 취약점이 발견되었습니다. 입력 데이터의 길이가 8의 배수가 아닐 경우 최대 7바이트의 힙 메모리 오버플로우가 발생하며, 이는 공격자가 제어 가능한 힙 손상으로 이어질 수 있습니다.
💡 쉬운 설명
프로그램이 데이터를 암호화할 때 필요한 공간보다 더 작은 공간을 준비하여, 데이터가 넘쳐흐르는 문제가 발생합니다. 이로 인해 해커가 컴퓨터의 메모리를 조작하여 시스템을 공격할 위험이 있습니다.
🇺🇸 원문 (English)
rust-openssl provides OpenSSL bindings for the Rust programming language. From 0.10.50 until 0.10.80, CipherCtxRef::cipher_update_inplace in openssl/src/cipher_ctx.rs incorrectly sized output buffers when used with AES key-wrap-with-padding ciphers EVP_aes_{128,192,256}_wrap_pad. For a non-multiple-of-8 input, OpenSSL writes up to 7 bytes past the end of the caller's buffer or Vec, producing attacker-controllable heap corruption when the plaintext length is attacker-influenced. This issue is fixed in version 0.10.80.
📍 영향받는 시스템
rust-openssl 0.10.50 버전부터 0.10.80 미만 버전
⚔️ 공격 벡터
공격자가 조작된 길이의 평문을 입력하여 힙 메모리 오버플로우를 유도하는 방식
🛡️ 대응 방법
rust-openssl 라이브러리를 0.10.80 이상 버전으로 업데이트
🔧 검증 코드
출력된 버전이 0.10.80 미만이면 취약한 상태이며, 0.10.80 이상이면 안전합니다.
cargo pkgid rust-openssl | grep -oE 'rust-openssl@0\.[0-9]+\.[0-9]+' || echo 'Not found'