Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-1327

Align SSL hostname verification with TLS libraries

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • 3.5.10
    • None
    • None

    Description

      from pr https://github.com/mariadb-corporation/mariadb-connector-j/pull/230

      HostnameVerifier.verify currently falls back to the certificate Subject Common Name (CN) even when the certificate presents Subject Alternative Names, which lets a cert be accepted for a host its SANs do not cover (e.g. CN=*.mariadb.org, SAN=[other.org, www.other.org] is wrongly accepted for a.mariadb.org).

      The connector should match the default behavior of the standard TLS libraries (OpenSSL X509_check_host, LibreSSL, BoringSSL), which is also the RFC 6125 §6.4.4 rule:

      Consult the CN‑ID only when the certificate presents no Subject Alternative Name of the type being matched. If a SAN of the matching type is present, the CN MUST be ignored even if none of those SANs match the reference host.

      Concretely, gate the CN fallback on the absence of a SAN of the matching type, not on the absence of any SAN

      connector will follow RFC 9525 (Service Identity in TLS, 2023) when TLS libraries will default to that too.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            diego dupin Diego Dupin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.