🇰🇷 한글 설명
OpenSSL의 저수준 OCB 암호화 API를 하드웨어 가속(AES-NI)과 함께 사용할 때, 16바이트의 배수가 아닌 길이의 입력은 마지막 부분 블록을 암호화하지 않습니다. 이로 인해 메시지의 마지막 1-15바이트가 평문으로 노출되고 인증 태그로 보호되지 않아 공격자가 탐지 없이 이를 읽거나 변조할 수 있습니다.
💡 쉬운 설명
OpenSSL에서 특정 암호화 기능을 직접 사용할 때 메시지 끝부분이 암호화되지 않고 노출될 수 있습니다. 일반 웹서비스와 TLS는 영향받지 않으며, 저수준 API를 직접 사용하는 특수한 응용프로그램만 취약합니다.
🇺🇸 원문 (English)
Issue summary: When using the low-level OCB API directly with AES-NI or<br>other hardware-accelerated code paths, inputs whose length is not a multiple<br>of 16 bytes can leave the final partial block unencrypted and unauthenticated.<br><br>Impact summary: The trailing 1-15 bytes of a message may be exposed in<br>cleartext on encryption and are not covered by the authentication tag,<br>allowing an attacker to read or tamper with those bytes without detection.<br><br>The low-level OCB encrypt and decrypt routines in the hardware-accelerated<br>stream path process full 16-byte blocks but do not advance the input/output<br>pointers. The subsequent tail-handling code then operates on the original<br>base pointers, effectively reprocessing the beginning of the buffer while<br>leaving the actual trailing bytes unprocessed. The authentication checksum<br>also excludes the true tail bytes.<br><br>However, typical OpenSSL consumers using EVP are not affected because the<br>higher-level EVP and provider OCB implementations split inputs so that full<br>blocks and trailing partial blocks are processed in separate calls, avoiding<br>the problematic code path. Additionally, TLS does not use OCB ciphersuites.<br>The vulnerability only affects applications that call the low-level<br>CRYPTO_ocb128_encrypt() or CRYPTO_ocb128_decrypt() functions directly with<br>non-block-aligned lengths in a single call on hardware-accelerated builds.<br>For these reasons the issue was assessed as Low severity.<br><br>The FIPS modules in 3.6, 3.5, 3.4, 3.3, 3.2, 3.1 and 3.0 are not affected<br>by this issue, as OCB mode is not a FIPS-approved algorithm.<br><br>OpenSSL 3.6, 3.5, 3.4, 3.3, 3.0 and 1.1.1 are vulnerable to this issue.<br><br>OpenSSL 1.0.2 is not affected by this issue.
📍 영향받는 시스템
OpenSSL 1.1.1, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6 (저수준 CRYPTO_ocb128_encrypt/decrypt 함수 직접 호출 시)
⚔️ 공격 벡터
16바이트 배수가 아닌 길이의 메시지를 저수준 OCB API로 암호화할 때 메시지 끝부분 노출 및 위변조
🛡️ 대응 방법
OpenSSL을 최신 패치 버전으로 업데이트하거나 저수준 API 대신 EVP 고수준 API 사용으로 변경
🔧 검증 코드
취약한 버전(1.1.1 또는 3.0-3.6)이 설치되어 있으면 버전 번호가 출력되고, 출력이 없으면 안전한 버전입니다.
openssl version | grep -oE '(1\.1\.[0-9]+|3\.[0-6])'