🔍 CVE-2022-4450

7.5
CVSS Score
HIGH
2023-02-08
2026-10-14 15:17
✅ 완료

🇰🇷 한글 설명

OpenSSL의 PEM_read_bio_ex() 함수가 페이로드 데이터가 0바이트인 특수하게 조작된 PEM 파일을 처리할 때, 이미 해제된 버퍼를 가리키는 포인터를 반환하는 취약점입니다. 호출자가 이 버퍼를 다시 해제하려고 시도할 경우 Double Free가 발생하여 프로그램이 충돌할 수 있습니다.

💡 쉬운 설명

악의적으로 만들어진 인증서 파일을 읽을 때 프로그램이 메모리를 중복으로 해제하려고 시도하여 시스템이 멈추거나 꺼질 수 있는 문제입니다. 공격자가 가짜 파일을 제공하면 서비스가 중단될 수 있습니다.

🇺🇸 원문 (English)

The function PEM_read_bio_ex() reads a PEM file from a BIO and parses and decodes the "name" (e.g. "CERTIFICATE"), any header data and the payload data. If the function succeeds then the "name_out", "header" and "data" arguments are populated with pointers to buffers containing the relevant decoded data. The caller is responsible for freeing those buffers. It is possible to construct a PEM file that results in 0 bytes of payload data. In this case PEM_read_bio_ex() will return a failure code but will populate the header argument with a pointer to a buffer that has already been freed. If the caller also frees this buffer then a double free will occur. This will most likely lead to a crash. This could be exploited by an attacker who has the ability to supply malicious PEM files for parsing to achieve a denial of service attack. The functions PEM_read_bio() and PEM_read() are simple wrappers around PEM_read_bio_ex() and therefore these functions are also directly affected. These functions are also called indirectly by a number of other OpenSSL functions including PEM_X509_INFO_read_bio_ex() and SSL_CTX_use_serverinfo_file() which are also vulnerable. Some OpenSSL internal uses of these functions are not vulnerable because the caller does not free the header argument if PEM_read_bio_ex() returns a failure code. These locations include the PEM_read_bio_TYPE() functions as well as the decoders introduced in OpenSSL 3.0. The OpenSSL asn1parse command line application is also impacted by this issue.

📍 영향받는 시스템

OpenSSL 1.0.2, 1.1.1 버전 (3.0 버전은 해당 함수 사용 방식에 따라 영향이 다를 수 있음)

⚔️ 공격 벡터

공격자가 조작된 PEM 파일을 시스템에 업로드하거나 전송하여 파싱을 유도함

🛡️ 대응 방법

OpenSSL을 최신 보안 패치가 적용된 버전으로 업데이트함

🔧 검증 코드

출력된 OpenSSL 버전이 취약점이 해결된 패치 버전인지 확인합니다.

Shell / Script
openssl version

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

💻 영향받는 소프트웨어

OpenSSL