[MDEV-28233] rsync SST script silently runs unencrypted if stunnel is not installed Created: 2022-04-04 Updated: 2023-03-03 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Encryption, Galera, Galera SST, SSL |
| Affects Version/s: | 10.6.7, 10.7.3 |
| Fix Version/s: | 10.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Hartmut Holzgraefe | Assignee: | Julius Goryavsky |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When configuring Galera SST to use TLS encryption with the rsync SST method the stunnel tool is used to perform the actual encryption. When stunnel is not installed though the wsrep_sst_rsync script just falls back to using unencrypted rsync, silently ignoring any TLS/SSL related settings in the [sst] configuration section. Especially even with ssl_mode=REQUIRED unencrypted rsync will be used. SST will succeed either way, and the only difference is that with stunnel installed the log will show:
when the stunnel binary was found, whereas otherwise one will just see:
This is the only hint towards whether encryption is actually being used or not ... |
| Comments |
| Comment by Hartmut Holzgraefe [ 2022-04-04 ] | |||||||||||
|
The problem comes down to this piece of code checking for stunnel presence when ssl_mode is being set in the [sst] section, giving feedback when it is found, but not when it is missing:
and later only having checks for $STUNNEL being set, but not for $SSL_MODE anymore. |