🇰🇷 한글 설명
WOLFSSL_SMALL_CERT_VERIFY 설정이 활성화된 wolfSSL 환경에서 인증서 파싱 오류가 서명 검증 결과를 가리는 취약점이 존재합니다. 공격자는 유효 기간이 만료된 위조된 인증서를 사용하여 신뢰할 수 있는 CA인 것처럼 속여 인증 과정을 우회할 수 있습니다. 이 취약점은 TLS 1.2, TLS 1.3 및 DTLS 프로토콜 모두에 영향을 미칩니다.
💡 쉬운 설명
인증서의 유효 기간이 지났더라도 검증 과정을 교묘하게 속여 가짜 인증서를 진짜처럼 믿게 만드는 보안 결함입니다. 해커가 만든 가짜 신분증을 시스템이 정상적인 것으로 착각하여 통신을 허용할 수 있습니다.
🇺🇸 원문 (English)
Under WOLFSSL_SMALL_CERT_VERIFY, ProcessPeerCertParse() runs the certificate signature check separately from the parse to keep peak memory down, then merges the two results, but it merged the signature result back only when the parse returned 0, so any parse error hid it. ParseCertRelative() reaches its validity-date, name-constraint and critical-extension checks only after ConfirmSignature() has passed, so splitting the signature check out inverts the precedence that makes "override date errors" a sound policy, and ASN_SIG_CONFIRM_E is never surfaced anywhere. The attacker needs no key material from the real PKI and no CA compromise: a self-made certificate carrying the expected subject name, the trusted CA's subject as its issuer, arbitrary bytes where the signature goes, a validity window in the past and the attacker's own key pair is sufficient. Affected builds define WOLFSSL_SMALL_CERT_VERIFY, which is off by default, is not set implicitly by any platform or preset header, and is not reachable from any CMake option; the autotools routes are --enable-lowresource, --enable-leantls, --enable-tinytls13=cert and --enable-tinytls13=mutualauth, and examples/configs/user_settings_embedded.h reaches it through WC_CFG_SMALL_CERT_VERIFY, which ships as 0, while neither --enable-all nor --enable-distro enables it at all. The application must additionally install a verify callback through wolfSSL_CTX_set_verify() or wolfSSL_set_verify() with WOLFSSL_VERIFY_PEER that returns 1 for ASN_BEFORE_DATE_E or ASN_AFTER_DATE_E; wolfSSL ships this exact shape as myVerify() in wolfssl/test.h under VERIFY_OVERRIDE_DATE_ERR, which examples/client -D selects. An application with no callback, or whose callback returns preverify for date errors, still fails the handshake, and wolfSSL_CertManagerVerifyBuffer() and wc_CheckCertSignature() report ASN_SIG_CONFIRM_E correctly in the same binary. TLS 1.2 and TLS 1.3 are affected in both directions, and DTLS reaches the same function; where the forged certificate is a chain certificate the callback's consent causes it to be cached in the WOLFSSL_CTX certificate manager, so an exposed deployment must restart the context or the process rather than merely reconnect.
📍 영향받는 시스템
WOLFSSL_SMALL_CERT_VERIFY 옵션이 활성화되고 날짜 오류를 무시하는 콜백을 사용하는 wolfSSL 기반 시스템
⚔️ 공격 벡터
신뢰할 수 있는 CA를 발행자로 사칭하고 유효 기간이 지난 위조된 인증서를 전송하여 인증 우회
🛡️ 대응 방법
WOLFSSL_SMALL_CERT_VERIFY 설정을 비활성화하거나, 날짜 오류(ASN_BEFORE_DATE_E/ASN_AFTER_DATE_E)를 무시하는 검증 콜백을 제거하십시오.
🔧 검증 코드
설정 파일에 WOLFSSL_SMALL_CERT_VERIFY가 정의되어 있고, 소스 코드 내에 날짜 오류를 1(성공)로 반환하는 검증 콜백이 있는지 확인하십시오.
grep -r "WOLFSSL_SMALL_CERT_VERIFY" /path/to/wolfssl/ && grep -r "wolfSSL_CTX_set_verify" /path/to/your/app