Bug #82495 | UPPER not working properly with AES Encryption | ||
---|---|---|---|
Submitted: | 8 Aug 2016 18:51 | Modified: | 18 Nov 2016 7:51 |
Reporter: | Bernardo Perez | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
Version: | 5.6/5.7 | OS: | Linux |
Assigned to: | CPU Architecture: | Any |
[8 Aug 2016 18:51]
Bernardo Perez
[8 Aug 2016 21:12]
MySQL Verification Team
Thank you for the bug report. C:\dbs>c:\dbs\5.5\bin\mysql -uroot --port=3550 --prompt="mysql 5.5 > " Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.52 Source distribution 2016-JUL-09 Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql 5.5 > use test Database changed mysql 5.5 > CREATE TABLE temp2(val VARCHAR(100)); Query OK, 0 rows affected (0.14 sec) mysql 5.5 > INSERT INTO temp2(val) VALUES(AES_ENCRYPT(UPPER('test'),'test')); Query OK, 1 row affected (0.14 sec) mysql 5.5 > SELECT AES_DECRYPT(val,'test') FROM temp2; +-------------------------+ | AES_DECRYPT(val,'test') | +-------------------------+ | TEST | +-------------------------+ 1 row in set (0.00 sec) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX C:\dbs>c:\dbs\5.6\bin\mysql -uroot --port=3560 -p --prompt="mysql 5.6 > " Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.33 Source distribution 2016-JUL-09 Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql 5.6 > use test Database changed mysql 5.6 > CREATE TABLE temp2(val VARCHAR(100)); Query OK, 0 rows affected (0.40 sec) mysql 5.6 > INSERT INTO temp2(val) VALUES(AES_ENCRYPT(UPPER('test'),'test')); Query OK, 1 row affected (0.08 sec) mysql 5.6 > SELECT AES_DECRYPT(val,'test') FROM temp2; +-------------------------+ | AES_DECRYPT(val,'test') | +-------------------------+ | | +-------------------------+ 1 row in set (0.00 sec) XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.7.15 Source distribution 2016-JUL-09 Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql 5.7 > use test Database changed mysql 5.7 > CREATE TABLE temp2(val VARCHAR(100)); Query OK, 0 rows affected (0.49 sec) mysql 5.7 > INSERT INTO temp2(val) VALUES(AES_ENCRYPT(UPPER('test'),'test')); Query OK, 1 row affected (0.13 sec) mysql 5.7 > SELECT AES_DECRYPT(val,'test') FROM temp2; +-------------------------+ | AES_DECRYPT(val,'test') | +-------------------------+ | | +-------------------------+ 1 row in set (0.04 sec)
[9 Aug 2016 7:56]
Tor Didriksen
Posted by developer: Fixed in trunk, by the patch for: Bug#22900560 CAST .. AS BINARY.. HEAP-USE-AFTER-FREE FROM ASAN Problem: conflicting usage of Item::str_value. Add Item_func_aes_encrypt::tmp_value and use it in val_str()
[18 Nov 2016 7:51]
Erlend Dahl
Fixed in 8.0.0 under the heading of Bug#22900560 CAST .. AS BINARY.. HEAP-USE-AFTER-FREE FROM ASAN