-
Notifications
You must be signed in to change notification settings - Fork 56
Check timestamp/snapshot contains snapshot/targets description #226
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1368,20 +1368,24 @@ it in the next step. | |||||||||||||
|
|
||||||||||||||
| 3. **Check for a rollback attack.** | ||||||||||||||
|
|
||||||||||||||
| 1. The version number of the trusted timestamp metadata file, if | ||||||||||||||
| any, MUST be less than the version number of the new timestamp | ||||||||||||||
| metadata file. If the new timestamp metadata version is less than the trusted | ||||||||||||||
| timestamp metadata version, discard it, abort the update cycle, and | ||||||||||||||
| report the potential rollback attack. In case they are equal, discard the new | ||||||||||||||
| timestamp metadata and abort the update cycle. This is normal and it | ||||||||||||||
| shouldn't raise any error. The reason for aborting the update process is that | ||||||||||||||
| there shouldn't be any changes in the content of this, or any other metadata | ||||||||||||||
| files too, considering it has the same version as the already trusted one. | ||||||||||||||
|
|
||||||||||||||
| 2. The version number of the snapshot metadata file in the | ||||||||||||||
| trusted timestamp metadata file, if any, MUST be less than or equal to its | ||||||||||||||
| version number in the new timestamp metadata file. If not, discard the new | ||||||||||||||
| timestamp metadata file, abort the update cycle, and report the failure. | ||||||||||||||
| 1. The version number of the trusted timestamp metadata file, if any, MUST be | ||||||||||||||
| less than the version number of the new timestamp metadata file. If the | ||||||||||||||
| new timestamp metadata version is less than the trusted timestamp metadata | ||||||||||||||
| version, discard it, abort the update cycle, and report the potential | ||||||||||||||
| rollback attack. In case they are equal, discard the new timestamp | ||||||||||||||
| metadata and abort the update cycle. This is normal and it shouldn't raise | ||||||||||||||
| any error. The reason for aborting the update process is that there | ||||||||||||||
| shouldn't be any changes in the content of this, or any other metadata | ||||||||||||||
| files too, considering it has the same version as the already trusted one. | ||||||||||||||
|
|
||||||||||||||
| 2. The new timestamp metadata file MUST only contain the description of the | ||||||||||||||
| snapshot metadata file. If not, discard the new snapshot metadata file, | ||||||||||||||
| abort the cycle, and report the failure. | ||||||||||||||
|
||||||||||||||
| 2. The new timestamp metadata file MUST only contain the description of the | |
| snapshot metadata file. If not, discard the new snapshot metadata file, | |
| abort the cycle, and report the failure. | |
| 2. The new timestamp metadata file's `METAFILES` object MUST only contain the | |
| snapshot metadata file. If not, discard the new timestamp metadata file, | |
| abort the cycle, and report the failure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used the term description from https://theupdateframework.github.io/specification/latest/#file-formats-timestamp, but I agree it's a little vague. I like yours better.
erickt marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 1. The new snapshot metadata file MUST contain the description of the targets | |
| 1. The new snapshot metadata file MUST contain the version numbers of the targets |
The listed item is the version numbers, not a description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that "description" was used as a short-hand for the version plus optional length and hashes (fields in a METAFILES object)? As this terminology is not used elsewhere we should certainly be more exploit here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we could say
The new snapshot metadata file's
METAFILESobject MUST list all targets metadata (top-level targets.EXT all all delegated roles) including their version numbers, optionally their length and optionally their hashes. If not, discard the new snapshot metadata file, abort the
etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fleshed this out more, with links back to the definitions. How does it read?
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| metadata file. If not, discard the new snapshot metadata file, abort the | |
| metadata files (the top-level targets.EXT and all delegated roles.) If not, discard the | |
| new snapshot metadata file, abort the |
Clarifying that this includes all targets files.
Uh oh!
There was an error while loading. Please reload this page.