[CONC-622] Errors from mysql_real_connect_cont are unrecoverable Created: 2022-12-27 Updated: 2023-01-15 Resolved: 2022-12-27 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | Non blocking API |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.4 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Ivan | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
There is no way to resolve situations when mysql_real_connect_cont (after called repeatedly until 0 is returned) fails to initialize a connection: If one tries to call mysql_close (or async counterpart) on the mysql handler, mysql_close invokes use after free or double free. Use after free comes from here: If this is indeed a bug this renders mariadb-connector-c async functionality borderline unusable or at the very least unsound in long-running server applications. Repro is attached, one could either follow the README to run it dockerized or just test on host machine |
| Comments |
| Comment by Ivan [ 2022-12-27 ] |
|
I see this got already fixed in github, very impressive, thank you Georg! |
| Comment by Georg Richter [ 2022-12-27 ] |
|
rev. da9bb98c0cef8097ee50341722f08d5042efbe49 |
| Comment by Ivan [ 2022-12-28 ] |
|
Hi Georg! Once again thank you for the quickest fix, and i can confirm that it fixes the issue for me. Do you by chance have an estimation on when this (3.3.4, i guess) could be made publicly available? |