mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
b27fd90ad3
TOCTOU bug. The path is checked to be valid, symlinks are resolved. Then the resolved path is opened. Between the check and the open, there's a window when one can replace some path component with a symlink, bypassing validity checks. Fix: after we resolved all symlinks in the path, don't allow open() to resolve symlinks, there should be none. Compared to the old MyISAM/Aria code: * fastpath. Opening of not-symlinked files is just one open(), no fn_format() and lstat() anymore. * opening of symlinked tables doesn't do fn_format() and lstat() either. it also doesn't to realpath() (which was lstat-ing every path component), instead if opens every path component with O_PATH. * share->data_file_name stores realpath(path) not readlink(path). So, SHOW CREATE TABLE needs to do lstat/readlink() now (see ::info()), and certain error messages (cannot open file "XXX") show the real file path with all symlinks resolved. |
||
---|---|---|
.. | ||
include | ||
combinations | ||
disabled.def | ||
error_on_close-8313.result | ||
error_on_close-8313.test | ||
federated.result | ||
federated.test | ||
federated_archive.result | ||
federated_archive.test | ||
federated_bug_13118.result | ||
federated_bug_13118.test | ||
federated_bug_25714.result | ||
federated_bug_25714.test | ||
federated_bug_32426.result | ||
federated_bug_32426.test | ||
federated_bug_35333.result | ||
federated_bug_35333.test | ||
federated_bug_585688.result | ||
federated_bug_585688.test | ||
federated_debug-master.opt | ||
federated_debug.result | ||
federated_debug.test | ||
federated_innodb.result | ||
federated_innodb.test | ||
federated_maybe_16324629.result | ||
federated_maybe_16324629.test | ||
federated_partition-slave.opt | ||
federated_partition.result | ||
federated_partition.test | ||
federated_server.result | ||
federated_server.test | ||
federated_transactions.result | ||
federated_transactions.test | ||
federatedx.result | ||
federatedx.test | ||
have_federatedx.inc | ||
have_federatedx.opt | ||
my.cnf | ||
suite.pm |