[MDEV-12241] unusual values in enums subvert SHOW CREATE TABLE and DESCRIBE Created: 2017-03-13 Updated: 2020-12-01 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.1.19, 10.2 |
| Fix Version/s: | 10.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Eric Herman | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | upstream | ||
| Description |
|
If I add backspaces, a literal 0x00, or other unusual characters to an enum value, I can see very strange results:
I can only imagine it gets worse if I add FormFeed or NewLine charaters. Also I am concerned how this impacts dump-and-restore. |
| Comments |
| Comment by Eric Herman [ 2017-03-13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
regarding backup and restore: https://blog.tarq.io/cve-2016-5483-backdooring-mysqldump-backups/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Herman [ 2017-03-13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
With the following:
In the SHOW CREATE TABLE case, the returned type is a VAR_STRING, which is fine, but I argue these values must be escaped:
In the DESCRIBE case, the `Type` is a BLOB, which I suggest is wrong. It should be an escaped VAR_STRING:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Herman [ 2017-03-14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I see similar results in upstream: https://bugs.mysql.com/bug.php?id=85440 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-04-17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for the report. |