[MDEV-14874] innodb_encrypt_log corrupts the log when the LSN crosses 32-bit boundary Created: 2018-01-05 Updated: 2020-08-25 Resolved: 2018-01-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Backup, Storage Engine - InnoDB, Storage Engine - XtraDB |
| Affects Version/s: | 10.1.3 |
| Fix Version/s: | 10.2.9, 10.3.2, 10.1.31 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | backup, encryption, recovery | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
If the InnoDB log sequence number is at least 4294967296, then Mariabackup --backup will fail to decrypt encrypted redo log blocks. Furthermore, if the most significant 32-bit half of the LSN changes during the redo log scanning in crash recovery, MariaDB will fail to decrypt the redo log blocks. This can be repeated by porting the following 10.2 test to 10.1:
Without the following patch, mariabackup would fail even earlier:
It looks like we have to replace srv_start_lsn in log_blocks_crypt with a proper parameter, similar to how it is in the 10.2 function log_crypt(). |
| Comments |
| Comment by Marko Mäkelä [ 2018-01-08 ] |
|
Mariabackup 10.1 would trivially fail to read any encrypted redo log if the LSN exceeds 4294967295, but a nastier problem is that InnoDB in MariaDB 10.1 could encrypt the redo log with wrong parameters. That is, not only backup, but also crash recovery may fail. In the MariaDB 10.2 series, a similar fix was part of |