🇰🇷 한글 설명
CMS (Auth)EnvelopedData 메시지 파싱 시 AEAD 암호화의 IV(초기화 벡터)가 고정 크기 스택 버퍼로 검증 없이 복사되어 스택 버퍼 오버플로우를 유발합니다. 인증 전에 발생하므로 유효한 키 없이도 공격 가능하며, DoS 또는 원격 코드 실행으로 이어질 수 있습니다.
💡 쉬운 설명
OpenSSL에서 암호화된 메시지를 받을 때 메시지의 크기를 충분히 확인하지 않아 메모리 손상이 발생합니다. 공격자가 특별히 만든 메시지를 보내면 프로그램이 crash되거나 조종당할 수 있습니다.
🇺🇸 원문 (English)
Issue summary: Parsing CMS AuthEnvelopedData or EnvelopedData message with
maliciously crafted AEAD parameters can trigger a stack buffer overflow.
Impact summary: A stack buffer overflow may lead to a crash, causing Denial
of Service, or potentially remote code execution.
When parsing CMS (Auth)EnvelopedData structures that use AEAD ciphers such as
AES-GCM, the IV (Initialization Vector) encoded in the ASN.1 parameters is
copied into a fixed-size stack buffer without verifying that its length fits
the destination. An attacker can supply a crafted CMS message with an
oversized IV, causing a stack-based out-of-bounds write before any
authentication or tag verification occurs.
Applications and services that parse untrusted CMS or PKCS#7 content using
AEAD ciphers (e.g., S/MIME (Auth)EnvelopedData with AES-GCM) are vulnerable.
Because the overflow occurs prior to authentication, no valid key material
is required to trigger it. While exploitability to remote code execution
depends on platform and toolchain mitigations, the stack-based write
primitive represents a severe risk.
The FIPS modules in 3.6, 3.5, 3.4, 3.3 and 3.0 are not affected by this
issue, as the CMS implementation is outside the OpenSSL FIPS module
boundary.
OpenSSL 3.6, 3.5, 3.4, 3.3 and 3.0 are vulnerable to this issue.
OpenSSL 1.1.1 and 1.0.2 are not affected by this issue.
📍 영향받는 시스템
OpenSSL 3.0, 3.3, 3.4, 3.5, 3.6 (FIPS 모듈 제외)
⚔️ 공격 벡터
악의적으로 조작된 CMS/PKCS#7 메시지를 AEAD 암호화(AES-GCM 등)로 전송하여 파싱 중 버퍼 오버플로우 트리거
🛡️ 대응 방법
OpenSSL을 3.0 이상의 패치된 버전으로 업그레이드하거나 필요 없으면 CMS 파싱 비활성화
🔧 검증 코드
버전이 3.0~3.6이면 취약함. 1.1.1 이하 또는 패치된 3.x 버전이면 안전
openssl version | grep -E 'OpenSSL 3\.[0-6]'