[CONC-604] TLS crash after reconnect Created: 2022-07-10 Updated: 2022-07-18 Resolved: 2022-07-18 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | TLS/SSL |
| Affects Version/s: | 3.3.1, 3.1.16 |
| Fix Version/s: | 3.1.17, 3.3.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Georg Richter | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Both OpenSSL and GnuTLS need to retrieve the MYSQL connection handle in case of an error via gnutls_session_get_ptr() or SSL_get_app_data() api functions. In case an reconnect occurred, the returned pointer still points to the stack address of tmp_mysql structure, declared in mariadb_reconnect() function. Since the content of tmp_mysql is copied to mysql, it is also necessary to update the mysql handle via gnutls_session_set_ptr() or SSL_set_app_data(). |