Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.2.24, 10.1.40, 10.3.15, 10.4.5
-
None
Description
This is similar to CONC-413.
Support for server certificate verification against subjectAltName (SAN) fields was added in the following Jira issues:
However, I noticed that clients don't necessarily check the server's IP address against the subjectAltName (SAN) fields in the certificate. They only check mysql->host, which can be a host name or an IP address. If the user specifies the server's host as a host name, then I don't believe that the client will verify the certificate using the server's IP address.
https://github.com/MariaDB/server/blob/mariadb-10.1.40/sql-common/client.c#L2647
https://github.com/MariaDB/server/blob/mariadb-10.1.40/sql-common/client.c#L1840
Could the IP address of the remote server be fetched in ssl_verify_server_cert() with the socket_remoteN functions by passing vio_fd(vio)?
Attachments
Issue Links
- relates to
-
CONC-250 SSL hostname verification for SubjectAltNames
- Closed
-
CONC-413 C/C may not compare IP address to Subject Alternative Name fields for server certificate verification
- Open
-
MDEV-10594 SSL hostname verification fails for SubjectAltNames
- Closed
-
MDEV-18131 MariaDB does not verify IP addresses from subject alternative names
- Closed