| Bug #32111 | Security Breach via DATA/INDEX DIRECTORY and RENAME TABLE | ||
|---|---|---|---|
| Submitted: | 5 Nov 2007 15:01 | Modified: | 15 Nov 2007 8:19 |
| Reporter: | Mattias Jonsson | ||
| Status: | Closed | ||
| Category: | Server: MyISAM | Severity: | S1 (Critical) |
| Version: | 4.0-> | OS: | Linux |
| Assigned to: | Sergey Vojtovich | Target Version: | 5.0.51,5.0.52,5.1.23 |
| Tags: | backport_050050SP1 | ||
[5 Nov 2007 15:01]
Mattias Jonsson
[5 Nov 2007 15:15]
Domas Mituzas
Reproduced that on 4.0, 4.1, 5.0
[5 Nov 2007 15:21]
Domas Mituzas
Workaround: --skip-symbolic-links
[6 Nov 2007 16:07]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/37190 ChangeSet@1.2215, 2007-11-06 18:09:33+04:00, svoj@mysql.com +3 -0 BUG#32111 - Security Breach via DATA/INDEX DIRECORY and RENAME TABLE RENAME TABLE against a table with DATA/INDEX DIRECTORY overwrites the file to which the symlink points. This is security issue, because it is possible to create a table with some name in some non-system database and set DATA/INDEX DIRECTORY to mysql system database. Renaming this table to one of mysql system tables (e.g. user, host) would overwrite the system table. Return an error when the file to which the symlink points exist.
[12 Nov 2007 14:43]
Bugs System
Pushed into 4.0.31
[14 Nov 2007 10:40]
Bugs System
Pushed into 6.0.4-alpha
[14 Nov 2007 10:45]
Bugs System
Pushed into 5.1.23-rc
[14 Nov 2007 10:49]
Bugs System
Pushed into 5.0.52
[14 Nov 2007 10:56]
Bugs System
Pushed into 4.1.24
[14 Nov 2007 20:35]
Sergei Golubchik
CVE-2007-5969
[15 Nov 2007 8:19]
MC Brown
A note has been added to the 4.0.31, 4.1.24, 5.0.52, 5.1.23, and 6.0.4 changelogs: Security Fix: Using RENAME TABLE against a table with explicit DATA DIRECTORY and INDEX DIRECTORY options can be used to overwrite system table information by replacing the symbolic link points. the file to which the symlink points. MySQL will now return an error when the file to which the symlink points already exists.
[15 Nov 2007 10:55]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/37835 ChangeSet@1.2539, 2007-11-15 10:55:47+01:00, joerg@mysql.com +3 -0 BUG#32111 - Security Breach via DATA/INDEX DIRECORY and RENAME TABLE RENAME TABLE against a table with DATA/INDEX DIRECTORY overwrites the file to which the symlink points. This is security issue, because it is possible to create a table with some name in some non-system database and set DATA/INDEX DIRECTORY to mysql system database. Renaming this table to one of mysql system tables (e.g. user, host) would overwrite the system table. Return an error when the file to which the symlink points exist. (This is a copy of changeset 2007/11/06 18:09:33+04:00 svoj@mysql.com and its merge changesets on the way from 4.0 up to 5.0)
[30 Nov 2007 18:59]
Joerg Bruehe
The fix for this is also in the community release 5.0.51.
