Repository navigation
Update shell.nix - #4
Closed
ali-dfinity-service wants to merge 1 commit into
Closed
ali-dfinity-service wants to merge 1 commit into
ali-dfinity-service wants to merge 1 commit into
Conversation
gitlab-dfinity
pushed a commit
that referenced
this pull request
May 3, 2023
… 'master' feat(crypto) CRP-1894: Zeroize old secret key store when writing new content The way the SKS is currently updated is as follows: 1. On startup, the SKS is read from disk, and maintained in memory. 2. If changes are made to the SKS (new key generated, old key deleted), the changes are made in memory, and then written to disk. The writing to disk is performed as follows: 1. Write the updated SKS to a new, temporary file. 2. Atomically replace the existing SKS by moving/renaming the new SKS to the location of the existing SKS. To zeroize the old SKS, the proposed approach when writing the new SKS to disk is as follows: 1. Create a hard link to the old SKS - same path and filename, but with “.old” suffix 2. Write the new SKS to disk using the temporary file and rename to replace the existing SKS as above. 3. Zeroize the old SKS file using the hard link created in step #1. 4. Remove the hard link created in step #1. In case the node/process crashes while writing the new SKS (in practice, somewhere after step #1 but before step #4), some cleanup needs to be done: - If the crash happened after #1 but before #2, the hard link with the “.old” suffix will point to the current SKS - in this case, simply remove the hard link to the SKS, but do not zeroize it. - If the crash happened after #2, perform steps #3 and #4 from above (zeroize the old file and delete it). The cleanup can be done when opening the SKS to read it. To determine which of the two cleanup actions should be done, check to see if a hard link with “.old” suffix exists, and if so, if it points to the same file (inode) as the current SKS - if yes, zeroize and delete the “.old” file; if no, simply delete the “.old” file. One scenario where this zeroization introduces a new security exposure is in case we crash between steps #2 and #3 above, where the new keystore has been written, but there is still a hard link to the old keystore, and the old keystore has not been zeroized. See merge request dfinity-lab/public/ic!10724
gitlab-dfinity
pushed a commit
that referenced
this pull request
Jan 16, 2024
test(registry): CRP-943: Fix delete subnet test Change the order in which system subnets are deleted in the `test_subnet_is_only_deleted_when_appropriate` test. The test flow is the following: 1. Create three subnets (two system subnets and one application subnet) 2. Verify that deleting a non-existent subnet fails 3. Verify that deleting the (hard-coded) NNS system subnet fails (no subnet with the mainnet NNS subnet ID exists in the test) 4. Verify that deleting the only system subnet fails 5. Verify that deleting the application subnet succeeds 6. Verify that deleting the second system subnet succeeds There are two issues in the test: - At step #4, there are two system subnets, so deleting either one should succeed - Currently, the deletion of the first system subnet fails at step #4 because the `crypto_threshold_signing_public_key` and `catch_up_package_contents` of that subnet is missing: `2024-01-09 16:31:05.727480874 UTC: [Canister rwlgt-iiaaa-aaaaa-aaaaa-cai] Panicked at '[Registry] Verification of the mutation type failed with the following errors: [Registry Canister Error. Msg: Key not present: catch_up_package_contents_ya35z-hhham-aaaaa-aaaap-yai, Registry Canister Error. Msg: Key not present: crypto_threshold_signing_public_key_ya35z-hhham-aaaaa-aaaap-yai].', rs/registry/canister/src/registry.rs:293:13` The reason why the system subnet deletion currently fails in step #4, but succeeds for the other system subnet in step #6, is because the first subnet is created in `invariant_compliant_mutation_as_atomic_req` which does not set the `crypto_threshold_signing_public_key` or `catch_up_package_contents` for the subnet, but the subsequently created second system subnet does have the `crypto_threshold_signing_public_key` and `catch_up_package_contents` set. The (temporary) fix in this MR does the following: - At step #4, verify that deleting the second system subnet succeeds - At step #6, verify that deleting the first (and now only) system subnet fails A more comprehensive fix that also sets `crypto_threshold_signing_public_key` and `catch_up_package_contents` for the first system subnet will follow in [a subsequent MR](https://gitlab.com/dfinity-lab/public/ic/-/merge_requests/17063). See merge request dfinity-lab/public/ic!17062
gitlab-dfinity
pushed a commit
that referenced
this pull request
May 8, 2024
andrewbattat
added a commit
that referenced
this pull request
Jan 21, 2026
frankdavid
added a commit
that referenced
this pull request
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.