Skip to content
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

FileList overwritten by old one #6

Closed
weiszg opened this issue Jan 18, 2016 · 2 comments
Closed

FileList overwritten by old one #6

weiszg opened this issue Jan 18, 2016 · 2 comments
Assignees
Labels

Comments

@weiszg
Copy link
Owner

weiszg commented Jan 18, 2016

Entities stored by CSC are usually indexed by their content hashes. However file lists (stored per user) are indexed by public keys. Their authenticity is protected by a signature. During stabilisation, different versions of these file lists have to be identified as they will have the same index (public key doesn't change). Currently a file list is determined to be newer if the peer advertising it advertises a different fileHash from what we have. This means that if an old peer comes back alive, it can overwrite the new file lists with its old ones. At least this is a race condition.

@weiszg weiszg added the bug label Jan 18, 2016
@weiszg weiszg self-assigned this Jan 18, 2016
@weiszg
Copy link
Owner Author

weiszg commented Jan 19, 2016

Proposed solution: include version number with the file list. We would actually have two version numbers, one attached to the end of the filelist upload call and the other one embedded in the filelist data, signed by the public key. This is because peers not in the possession of the public key will still have to be able to determine which one of two filelists is the newer one. Malicious peers may report wrong numbers, even replay old messages with higher numbers, however when this filelist is read by someone else (assuming it is not the malicious peer that is responsible for storing the filelist), the reported version number will mismatch with the one embedded in the replayed data hence the operation will fail. This is consistent with our goal of allowing malicious peers to corrupt the data as long as we always can tell if the data is not authentic.

@weiszg
Copy link
Owner Author

weiszg commented Mar 5, 2016

solution implemented in commit c467877

@weiszg weiszg closed this as completed Mar 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant