🇰🇷 한글 설명
libcurl의 ASN.1 파서 내 GTime2str() 함수에서 구문이 잘못된 Generalized Time 필드를 처리할 때 발생합니다. 이로 인해 시간 소수점 길이에 -1이 할당되어 널 종료되지 않은 힙 버퍼에 대해 strlen()이 실행될 수 있습니다. 이는 프로그램 충돌을 유발하거나 CURLINFO_CERTINFO 사용 시 힙 메모리 내용이 유출될 수 있습니다.
💡 쉬운 설명
잘못된 형식의 시간 정보가 포함된 인증서를 처리할 때 프로그램이 갑자기 꺼지거나, 컴퓨터 메모리의 민감한 정보가 외부로 새 나갈 수 있는 결함입니다.
🇺🇸 원문 (English)
libcurl's ASN1 parser code has the `GTime2str()` function, used for parsing an
ASN.1 Generalized Time field. If given an syntactically incorrect field, the
parser might end up using -1 for the length of the *time fraction*, leading to
a `strlen()` getting performed on a pointer to a heap buffer area that is not
(purposely) null terminated.
This flaw most likely leads to a crash, but can also lead to heap contents
getting returned to the application when
[CURLINFO_CERTINFO](https://curl.se/libcurl/c/CURLINFO_CERTINFO.html) is used.
📍 영향받는 시스템
libcurl (ASN.1 파서의 GTime2str 함수를 사용하는 버전)
⚔️ 공격 벡터
조작된 ASN.1 시간 필드를 포함한 악성 인증서를 서버나 클라이언트가 처리하도록 유도
🛡️ 대응 방법
libcurl을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 libcurl 버전을 확인하여 취약점이 해결된 최신 버전인지 확인