[MDEV-16396] Perl's DBD::MySQL does not read SSL settings from [client] configuration group with MariaDB libmysqlclient.so Created: 2018-06-04 Updated: 2020-08-25 Resolved: 2018-06-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients, SSL |
| Affects Version/s: | 5.5, 10.0, 10.1 |
| Fix Version/s: | 5.5.61, 10.0.36, 10.1.34 |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream-fixed | ||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Let's say that we have the following configuration file:
The normal "mysql" command-line client definitely uses these SSL settings:
However, when using a program that relies on Perl's DBD::MySQL, such as innotop, it appears that these SSL settings are not used when the underlying libmysqlclient.so is provided by MariaDB. In contrast, if the underlying libmysqlclient.so is provided by MySQL, then it does use the SSL settings. I confirmed this by running innotop with strace using various versions of libmysqlclient.so in the following way:
The results show that only MySQL's libmysqlclient.so reads the PEM certificate files, even though all versions of the libmysqlclient.so read the actual configuration file. mariadb-libs 5.5.56 from the RHEL 7's standard yum repository:
MariaDB-shared + MariaDB-compat + MariaDB-common 10.1.33 from RHEL 7 RPMs from mariadb.org:
MySQL-shared + MySQL-shared-compat 5.6.40 from RHEL 7 RPMs from dev.mysql.com:
As you can see, only MySQL's libmysqlclient.so caused innotop to read the PEM certificate files. Is this intentional, or a bug? I've attached the strace output. In addition to innotop, I've also been informed that this also affects Percona Toolkit, since those tools are also Perl programs that rely on DBD::MySQL. |
| Comments |
| Comment by Vladislav Vaintroub [ 2018-06-05 ] | |||||||||||||||||||||
|
GeoffMontee I think, you can get clients to ssl by additional ssl=1 in the config file | |||||||||||||||||||||
| Comment by Elena Stepanova [ 2018-06-05 ] | |||||||||||||||||||||
|
Confirming and setting affected versions based on the above. | |||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2018-06-05 ] | |||||||||||||||||||||
|
Thanks for the idea, wlad. It doesn't look like that forced the client to read the pem files either though:
| |||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2018-06-05 ] | |||||||||||||||||||||
|
I also checked MySQL 5.5.60, and that seems to read the pem files in the same way that MySQL 5.6.40 does.
| |||||||||||||||||||||
| Comment by Vladislav Vaintroub [ 2018-06-07 ] | |||||||||||||||||||||
|
Fixed with | |||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2018-06-07 ] | |||||||||||||||||||||
|
Thanks, wlad. I think "Fix Versions" for this one is wrong. Shouldn't it be 5.5.61, 10.0.36, 10.1.34 to match | |||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2018-06-07 ] | |||||||||||||||||||||
|
I just did a quick test, and it does look like 10.2 is also affected:
| |||||||||||||||||||||
| Comment by Vladislav Vaintroub [ 2018-06-07 ] | |||||||||||||||||||||
|
please open another bug against Connector/C then. | |||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2018-07-09 ] | |||||||||||||||||||||
|
georg said on | |||||||||||||||||||||
| Comment by Elena Stepanova [ 2018-07-09 ] | |||||||||||||||||||||
|
libmysqlclient.so.18 is re-packaged into compat from mariadb-shared-10.1-kvm-rpm-centos73-amd64.rpm and alike. | |||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2018-07-09 ] | |||||||||||||||||||||
|
So if libmysqlclient.so.18 from 10.2's MariaDB-compat package on RHEL 7 is repackaged from mariadb-shared-10.1-kvm-rpm-centos73-amd64.rpm, then it sounds like that means that this 10.2 package will eventually inherit this fix from 10.1 in a future 10.2 release. Is that correct? | |||||||||||||||||||||
| Comment by Elena Stepanova [ 2018-07-09 ] | |||||||||||||||||||||
|
serg or dbart might be better people to answer this, I don't know how often these 10.1 packages, which are used for producing compat, are updated, if ever. | |||||||||||||||||||||
| Comment by Daniel Bartholomew [ 2018-07-09 ] | |||||||||||||||||||||
|
I've updated the 10.1-shared packages we use for creating the 10.2 & 10.3 compat to the ones from 10.1.34. They're supposed to be updated with every 10.1 release, but it looks like that step got missed for the past few releases. |