re-edit and add some new security issues (removed a lot of unfinished detail on the grounds that it was too technical for this audience)

[Imported from Trac: page Security, version 12]
zooko 2007-12-17 19:10:08 +00:00
parent fe397016db
commit d8713552e6

@ -6,105 +6,31 @@ issues that might have security consequences.
# Current Known Security Issues in Tahoe
* XSRF / Browser-based Attacks
as of December 17, 2007
* #127: the URI of a file is embedded in the URL that is used to access it.
This URI should not be unintentionally revealed to anyone else, because
that would reveal the full contents of the file. There are two current
ways this URI can be unintentionally revealed:
* privilege escalation for directory servers
* If the file is HTML and contains a hyperlink to an external web server,
any user who follows that hyperlink may reveal the URI to that web
server through the Referrer header.
In the v0.6.1 release of Tahoe, it was intended and documented that you could grant read authority, read/write authority, or no authority to any person. We overlooked the fact that the limitation on write authority does not apply to people who control the directory server on which your encrypted directory resides. If you grant read-authority to such a person, they automatically get read-write authority.
* If the file is HTML and contains active content such as Javascript,
that javascript can read the URL (and consequently the secret URI)
as it runs. This javascript may then find some clever way to reveal
the URI to a third party (such as by changing the src= attribute of
an image tag).
The next version of Tahoe, v0.7.0, which will be released soon, fixes this issue by using more powerful cryptography. In Tahoe v0.7.0 you can grant read authority, read/write authority, or no authority to any person and they are unable to get more authority than you've granted them, even if they control some of the servers on which your encrypted files and directories reside.
* We are thinking about ways to close off this leakage of authority while
preserving ease of use -- the ticket associated with this issue is ticket
#127. In the meantime, a good work-around is to remove all hyperlinks
pointing to external servers from any HTML file that you upload to a
Tahoe grid, and to not store HTML with embedded javascript, if you want
the contents of the file to remain private. Note that no other files or
directories are threatened, only the HREF/JS-bearing HTML file.
* temporary exposure to local attacker
In the v0.6.1 release of Tahoe, there was a short window of opportunity in which a local user on your system could read secrets out of the ~/.tahoe directory after they were written into that directory but before their permissions were set to be not-world-readable. This would be prevented on unix-like systems if you turned off the 'x' permissions bit on your home directory or on the .tahoe directory. In the upcoming v0.7.0 release of Tahoe such secrets are kept in a subdirectory of the ~/.tahoe directory, named ~/.tahoe/private, which is set so that users other than its owner cannot read data from files within it.
* potential exposure of a file through embedded hyperlinks or [JavaScript](JavaScript) in that file
If there is a file stored on a Tahoe storage grid, and that file gets downloaded and displayed in a web browser, then [JavaScript](JavaScript) or hyperlinks within that file can leak the capability to that file. Anyone who receives the leaked capability gets access to the file.
* [JavaScript](JavaScript): if there is [JavaScript](JavaScript) in the file, then it could deliberately leak the capability to the file out to some remote listener.
* hyperlinks: if there are hyperlinks in the file, and they get followed, then whichever server they point to receives the capability to the file. Note that IMG tags are typically followed automatically by web browsers, so being careful which hyperlinks you click on is not sufficient to prevent this from happening.
For future versions of Tahoe, we are considering ways to close off this leakage of authority while preserving ease of use -- the discussion of this issue is ticket #127.
For the present, a good work-around is that if you want to store and view a file on Tahoe and you want that file to remain private, then remove from that file any hyperlinks pointing to other people's servers and remove [JavaScript](JavaScript) unless you are sure that the [JavaScript](JavaScript) is not written to maliciously leak access.
# General Security Properties of Tahoe
**The rest of this page, below, is not complete.** However, you can view
[the detailed technical explanation]source:docs/architecture.txt@1432#L472
of which this page is eventually intended to be a summary.
This is a summary of the general properties of the Tahoe secure decentralized filesystem.
# The Distributed Filesystem
For technical details, there is [the architecture document]source:docs/architecture.txt.
## Access Control
The Tahoe distributed filesystem is composed of files and directories.
### Files
#### read access
Each file has a unique and unguessable identifier, called a "CHK-URI", which
may be derived from the file contents. Possession of this identifier is
necessary and sufficient to download, reconstruct, decrypt, and verify the
integrity of the file. If a person is not given the CHK-URI, then they cannot
see the contents of the file.
#### mutation
Files in the Tahoe grid are immutable. If you upload a file to the grid, and
then change part of it and upload it again, then there are now two files in
the grid -- the old one and the new one -- and each has a distinct, unique,
CHK-URI. The directory to which the new file was uploaded will only contain a
reference to the new file. If no other directories still reference the old
file (and if no manual copies of the URI were retained), the old file will be
unreachable.
A future extension will provide mutable files. For these, a given URI will
not necessarily refer to a specific sequence of bytes, but rather to just the
most recent contents that were uploaded to that URI. Like dirnode URIs, these
URIs will come in read-write and read-only forms, and the file can only be
modified by someone who holds a read-write URI.
## Traffic Analysis
*To be filled in.* Traffic analysis is subtle and powerful. The distributed
nature of Tahoe provides even more information to a passive observer than
usual.
All traffic between tahoe nodes uses transport-level encryption, so an
attacker must participate in a Tahoe network to obtain visibility into which
shares are being uploaded and downloaded. However, the promiscuous nature of
tahoe's Introduction protocol makes this rather easy.
In small networks, most server see upload and download requests for all
files. In large networks, an attacker who can provide at least 10% of the
servers (for 3-of-10 encoding) will get to see upload/download requests for
all files. By seeing these requests, the attacker gets to know who is
interested in which files, although they cannot determine the contents of
those files unless they already have a copy (and convergence is being used).
The directory nodes are encrypted, but all of the dirnodes are stored on the
same central server (the "vdrive server"). This server is in an excellent
position to see who accesses which dirnodes and when, and this information is
sufficient to build a dirnode graph that is equivalent to the user's
plaintext version. For example, if the server sees a get(dirnode#47, "34af")
followed by a get(dirnode#13, "8bb3"), it is safe to assume that dirnode#47
contains dirnode#13 as a subdirectory, and that "34af" is the encrypted form
of the subdir's name.
This reconstructed graph has file/subdir names which are encrypted but the
same length as the real ones. The file URIs are not known, although if a file
is uploaded or downloaded shortly after a dirnode is accessed it is easy to
relate the two. Again, this points to the identity of the file, but not its
contents. However, it makes it fairly easy for the dirnode server to tell,
5.g., if a lot of users are all referencing the same file.
A future design will include distributed directory nodes (to improve
availability and reliability). This will result in the same traffic-analysis
exposure as the centralized vdrive server, but makes the traffic visible to
even more servers (anyone who controls more than 10% of the servers will be
able to see all dirnode requests).