Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL)
-
None
-
5.5.55
Description
In one created a MyISAM table with DATA_DIRECTORY or INDEX_DIRECTORY attributes (that is, with symlinks) mi_open() and mi_delete() used the pattern of
- expand all symlinks with realpath()
- verify that the true path isn't leading into a datadir
- open (or, accordingly, delete) the file
This is race condition prone, one can change the symlink after it was expanded by realpath() but before the file is opened.
Attachments
Issue Links
- links to
svoj, could you please review the final fix? It's a set of commits, the complete diff is
git diff bb-5.5-serg^{/DEBUG_SYNC}..bb-5.5-serg^{/my_delete_with_symlink}
and you can look at individual commits with
gitk bb-5.5-serg^{/DEBUG_SYNC}..bb-5.5-serg^{/my_delete_with_symlink}
The main one is "
MDEV-11902mi_open race condition" and the four topmost ones (about my_delete).