kcve.ai취약점 정보 · 내 자산 확인

CVE-2021-4044 Invalid handling of X509_verify_cert() internal errors in libssl

libssl에서 X509_verify_cert() 내부 에러의 잘못된 처리

설명

OpenSSL의 내부 libssl은 서버에서 제공하는 인증서를 확인하기 위해 클라이언트 측에서 X509_verify_cert()를 호출합니다. 이 함수는 내부 오류(예를 들어 메모리 부족)를 나타내기 위해 음의 반환 값을 반환할 수 있습니다. 이러한 부정적인 반환 값은 OpenSSL에 의해 잘못 처리되고 IO 함수(예: SSL_connect() 또는 SSL_do_handshake())가 성공을 나타내지 않고 SSL_get_error()에 대한 후속 호출로 인해 값을 반환하게 됩니다. 이 반환 값은 애플리케이션이 이전에 SSL_CTX_set_cert_verify_callback()을 호출한 경우에만 OpenSSL에 의해 반환되어야 합니다. 대부분의 애플리케이션이 이 작업을 수행하지 않기 때문에 SSL_get_error()의 SSL_ERROR_WANT_RETRY_VERIFY 반환 값은 전혀 예상치 못한 것이며 결과적으로 애플리케이션이 올바르게 작동하지 않을 수 있습니다. 정확한 동작은 응용 프로그램에 따라 다르지만 충돌, 무한 루프 또는 기타 유사한 잘못된 응답을 초래할 수 있습니다. 이 문제는 OpenSSL 3.0의 별도 버그와 함께 발생하여 X509_verify_cert()가 인증서 체인을 처리할 때 내부 오류를 나타내는 데 더 심각합니다. 이 문제는 인증서에 주체 대체 이름 확장이 포함되지 않지만 인증 기관에서 이름 제약이 적용되는 경우에 발생합니다. 이 문제는 유효한 체인에서도 발생할 수 있습니다. 두 문제를 결합하면 공격자가 잘못되고 애플리케이션에 종속된 행동을 유도할 수 있습니다. OpenSSL 3.0.1 (유효성 3.0.0)에서 수정되었습니다.

원문 보기

Internally libssl in OpenSSL calls X509_verify_cert() on the client side to verify a certificate supplied by a server. That function may return a negative return value to indicate an internal error (for example out of memory). Such a negative return value is mishandled by OpenSSL and will cause an IO function (such as SSL_connect() or SSL_do_handshake()) to not indicate success and a subsequent call to SSL_get_error() to return the value SSL_ERROR_WANT_RETRY_VERIFY. This return value is only supposed to be returned by OpenSSL if the application has previously called SSL_CTX_set_cert_verify_callback(). Since most applications do not do this the SSL_ERROR_WANT_RETRY_VERIFY return value from SSL_get_error() will be totally unexpected and applications may not behave correctly as a result. The exact behaviour will depend on the application but it could result in crashes, infinite loops or other similar incorrect responses. This issue is made more serious in combination with a separate bug in OpenSSL 3.0 that will cause X509_verify_cert() to indicate an internal error when processing a certificate chain. This will occur where a certificate does not include the Subject Alternative Name extension but where a Certificate Authority has enforced name constraints. This issue can occur even with valid chains. By combining the two issues an attacker could induce incorrect, application dependent behaviour. Fixed in OpenSSL 3.0.1 (Affected 3.0.0).

영향 받는 제품 제품 3개

  • OpenSSL

    OpenSSL

    영향 받는 버전

    • 버전 정보 확인 필요

    해결 버전

    해결된 버전 정보가 없습니다.

  • nodejs

    node.js

    NVD 기준 해결 버전 있음

    영향 받는 버전

    • 17.0.0 이상 17.3.0 미만

    해결 버전

    • 17.3.0 이상
  • openssl

    openssl

    NVD 기준 해결 버전 있음

    영향 받는 버전

    • 1.0.2 미만
    • 1.1.0
    • 3.0.0

    해결 버전

    • 1.0.2 이상

참고 자료 3건

‹ 목록

점검 지원 범위 문의

도입 문의