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

Consider adding an upper bound on the number of root metadata we'll fetch in Client::update_root #306

Open
erickt opened this issue Oct 24, 2020 · 0 comments

Comments

@erickt
Copy link
Collaborator

erickt commented Oct 24, 2020

TUF-1.0.9 §5.1.2 states:

Try downloading version N+1 of the root metadata file, up to some W number of
bytes (because the size is unknown). The value for W is set by the authors of
the application using TUF. For example, W may be tens of kilobytes. The filename
used to download the root metadata file is of the fixed form
VERSION_NUMBER.FILENAME.EXT (e.g., 42.root.json). If this file is not available,
or we have downloaded more than Y number of root metadata files (because the
exact number is as yet unknown), then go to step 5.1.9. The value for Y is set
by the authors of the application using TUF. For example, Y may be 2^10.

We do not have an upper bound on the number of root metadata we'll fetch. This means that an attacker that's stolen the root keys could cause a client to fall into an infinite loop (but if an attacker has stolen the root keys, the client probably has worse problems to worry about).

erickt added a commit to erickt/rust-tuf that referenced this issue Oct 24, 2020
* Fix a comment since TrackRepository only tracks metadata changes.
* Error rather than panic if root version is 2^32 or above.
* Add a fixme(theupdateframework#306) to add a limit on the number of root metadata fetch.

Change-Id: I8adef8261108ee45630c407738372fb37e93c3b4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant