mutable files: add ciphertext hash tree to signature block #492
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#492
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The problem described in #491 is also applicable to mutable files, albeit with less severe consequences. Mutable files do not have a plaintext or ciphertext hash (instead they rely upon the share hash tree, and assume that decoding works correctly), which means that a malicious publisher could create some shares for file A and other shares for file B, publish both of them together, compute and sign the share hash tree over the combination, and give the resulting read-cap to their victim. The victim would download the indicated file, and sometimes they would get file A, other times they would get file B, depending upon which servers they happened to use for the download.
This isn't as severe as #491 because the file is mutable anyways: the malicious publisher could just as easily publish a new version of the file in between the victim's download attempts (and of course, only the holder of a write-cap can perform this kind of attack). However, we would prefer that the seqnum+roothash "version info" field uniquely identify a single file, and we need a ciphertext hash of some sort to enforce this requirement.
The most likely fix is to use the same ciphertext hash tree as immutable files have: add a merkle tree over the ciphertext segments, put the tree nodes in all shares, put the root of this tree in the signature block, verify it on download.
This is not as easy to fix as #491 because the code for this ciphertext hash tree is not already in place, and the current SDMF format does not accomodate it. So current clients would not be able to download files that have the new hash added, causing a backwards compatibility break.
Therefore we plan to address this when we move to DSA-based mutable files (#217), since that is a backwards-compatibility break anyways.
I'd completely forgotten about this bug. Is there anything we can do in terms of forward compatibility to better tolerate a format change? Does the MDMF format accomodate a ciphertext hash tree? I don't think fixing this should necessarily be tied to #217.