-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Server Security
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Currently, accesses to the KEK store often assume that they are not acting concurrently. This can lead to TOCTTOU issues. Improve this by making the KEK store use atomic load/compare-and-swap semantics:
- The Keystore object itself loses its accessors and mutators of the keystore, and instead just hands out KeystoreSnapshots.
- These are versioned snapshots of the keystore.
- To modify the keystore, callers take a snapshot, modify it, then use the Keystore::commit function, which takes a modified KeystoreSnapshot and implements CAS semantics: The commit only goes through if the Snapshot's version matches the keystore's base version.