New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
encryption: encryption may corrupt data when partial write #15080
Labels
affects-6.1
affects-6.2
affects-6.3
affects-6.4
affects-6.5
affects-6.6
affects-7.0
affects-7.1
affects-7.2
severity/major
type/bug
Type: Issue - Confirmed a bug
Comments
This is probably because some of the block encryption method(includes tikv/components/encryption/src/io.rs Lines 333 to 338 in a5f1a26
When L337 writes partial of the content, the encrypted block will be partial. The counter of CTR mode may contribute to this problem too. (What if some blocks are skipped? they will be lost in the sequence generated by the counter.) |
YuJuncen
changed the title
encryption: encryption may corrupt data for partial write
encryption: encryption may corrupt data when partial write
Jul 6, 2023
ti-chi-bot bot
pushed a commit
that referenced
this issue
Jul 25, 2023
close #15080 Fix offset inconsistency between crypter and file that could cause data corruption when file I/O is interrupted. Signed-off-by: tabokie <xy.tao@outlook.com> Co-authored-by: tonyxuqqi <tonyxuqi@outlook.com>
ti-chi-bot
pushed a commit
to ti-chi-bot/tikv
that referenced
this issue
Jul 25, 2023
close tikv#15080 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
This was referenced Jul 25, 2023
ti-chi-bot bot
added a commit
that referenced
this issue
Aug 2, 2023
#15206) close #15080 Fix offset inconsistency between crypter and file that could cause data corruption when file I/O is interrupted. Signed-off-by: tabokie <xy.tao@outlook.com> Co-authored-by: tabokie <xy.tao@outlook.com> Co-authored-by: tonyxuqqi <tonyxuqi@outlook.com> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-6.1
affects-6.2
affects-6.3
affects-6.4
affects-6.5
affects-6.6
affects-7.0
affects-7.1
affects-7.2
severity/major
type/bug
Type: Issue - Confirmed a bug
Bug Report
What version of TiKV are you using?
Current Master.
What operating system and CPU are you using?
Linux, x86_64.
Steps to reproduce
Apply the following patch (based on
a5f1a26d3bb5121a845f644b5eebff3d6c041278
):Patch Content
Then, run the test case
test_decrypt_encrypted_text
.What did you expect?
The case should pass.
What did happened?
The text was updated successfully, but these errors were encountered: