Skip to content

Commit

Permalink
Fix issue-153: Server crash and database corruption
Browse files Browse the repository at this point in the history
We can't use the Tuple CID as an IV because it changes when the tuple is deleted.
If we have a trigger function that needs the deleted tuple, it will get the
wrong IV when decrypting. This happens because the CID used to encrypt the tuple
(during INSERT/UPDATE) is different from the CID passed to the decryption
function (during delete).

To fix this, we need to stop using the CID for IV calculation.
  • Loading branch information
codeforall committed Apr 2, 2024
1 parent 25b7794 commit 22dcf47
Show file tree
Hide file tree
Showing 5 changed files with 1,070 additions and 7 deletions.
1 change: 1 addition & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ move_large_tuples \
non_sorted_off_compact \
update_compare_indexes \
pgtde_is_encrypted \
test_issue_153_fix \
multi_insert \
trigger_on_view \
insert_update_delete \
Expand Down
Loading

0 comments on commit 22dcf47

Please sign in to comment.