Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.11, 11.4, 11.8, 12.3
-
Notable changes
Description
CHECKSUM TABLE requires only SELECT privilege on at least some columns of the table, not all. But it returns a checksum calculated over all columns.
If the user has SELECT on all columns but one. And the table has only one row. The user can solve the equation and derive the hidden column value (for certain column types) from the other columns and the checksum. Like
CREATE TABLE users (id INT, name VARCHAR(100), salary INT); |
INSERT users VALUES (1, 'John Doe', 123456); |
CREATE USER u@localhost; |
GRANT SELECT (id, name) ON test.users TO u@localhost; |
--connect u,localhost,u
|
SELECT id,name FROM users; |
CHECKSUM TABLE users; |
Note that the documentation is wrong, it says
CHECKSUM TABLE requires the SELECT privilege for the table.
let's make it correct and change the code to require, indeed, the SELECT privilege for the whole table.
Reported by Yalguun Tumenkhuu
Attachments
Issue Links
- links to