You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Timestamp rollback check should also check for snapshot rollback
This updates section 5.2.2 to also state that when updating the
`timestamp` role, we should also check to make sure new `timestamp`
role's `snapshot` version is greater than or equal to the trusted
`timestamp`'s `snapshot` version.
This is an important check when initializing a TUF database. For
example, say we had the following TUF metadata:
* `root`, which has signed all the below metadata
* `snapshot` version 1, which points at a target with a compromised package
* `snapshot` version 2, which points at a target with a fixed package
* `timestamp` version 2, which points at snapshot version 2
Lets say an attacker has stolen the `timestamp` keys, they could forge a
new `timestamp` role which points at `snapshot` version 1. In the normal
case where we have a fully initialized TUF database with a trusted
`root`, `timestamp` version 2, and `snapshot` version 2, this malicious
timestamp would get rejected because of the section 5.3.2 snapshot
rollback check.
However, consider a partially initialized repository, where we only
trust `root` and `timestamp` version 2, and for some reason were not
able to fetch the rest of the metadata. In this setup, we won't have a
trusted `snapshot` available for the 5.3.2 rollback check. Thus, the
rollback attack would succeed.
To fix this, I've adopted the language in section 5.3.3, where when
updating the `snapshot` role, we do explicitly check to see if the listed
`targets` or any delegated `targets` version is always greater than or
equal to the trusted versions of those roles.
0 commit comments