Skip to content

Commit 86b9df9

Browse files
committed
Revert "Remove 2nd targets rollback attack check"
This reverts commit 2eccb59. 2eccb59 removed rollback attack check for top-level targets file, which is (1) redundant and (2) prevents recovery from a fast-forward attack (see commit message for details). This commit reverts the change, because the redundancy (1) is actually desired, so that an attacker does not only have to compromise timestamp, but snapshot and (delegated) targets too, in order to launch rollback attacks. Fast-forward attack recovery (2) shall be fixed in a subsequent comment.
1 parent 69b8456 commit 86b9df9

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

tuf-spec.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,36 +1225,42 @@ non-volatile storage as FILENAME.EXT.
12251225
trusted root metadata file. If the new targets metadata file is not signed
12261226
as required, discard it, abort the update cycle, and report the failure.
12271227

1228-
* **4.3**. **Check for a freeze attack.** The latest known time should be
1228+
* **4.3**. **Check for a rollback attack.** The version number of the trusted
1229+
targets metadata file, if any, MUST be less than or equal to the version
1230+
number of the new targets metadata file. If the new targets metadata file is
1231+
older than the trusted targets metadata file, discard it, abort the update
1232+
cycle, and report the potential rollback attack.
1233+
1234+
* **4.4**. **Check for a freeze attack.** The latest known time should be
12291235
lower than the expiration timestamp in the new targets metadata file. If so,
12301236
the new targets metadata file becomes the trusted targets metadata file. If
12311237
the new targets metadata file is expired, discard it, abort the update cycle,
12321238
and report the potential freeze attack.
12331239

1234-
* **4.4**. **Perform a preorder depth-first search for metadata about the
1240+
* **4.5**. **Perform a preorder depth-first search for metadata about the
12351241
desired target, beginning with the top-level targets role.** Note: If
1236-
any metadata requested in steps 4.4.1 - 4.4.2.3 cannot be downloaded nor
1242+
any metadata requested in steps 4.5.1 - 4.5.2.3 cannot be downloaded nor
12371243
validated, end the search and report that the target cannot be found.
12381244

1239-
* **4.4.1**. If this role has been visited before, then skip this role (so
1245+
* **4.5.1**. If this role has been visited before, then skip this role (so
12401246
that cycles in the delegation graph are avoided). Otherwise, if an
12411247
application-specific maximum number of roles have been visited, then go to
12421248
step 5 (so that attackers cannot cause the client to waste excessive
12431249
bandwidth or time). Otherwise, if this role contains metadata about the
12441250
desired target, then go to step 5.
12451251

1246-
* **4.4.2**. Otherwise, recursively search the list of delegations in order
1252+
* **4.5.2**. Otherwise, recursively search the list of delegations in order
12471253
of appearance.
12481254

1249-
* **4.4.2.1**. If the current delegation is a multi-role delegation,
1255+
* **4.5.2.1**. If the current delegation is a multi-role delegation,
12501256
recursively visit each role, and check that each has signed exactly the
12511257
same non-custom metadata (i.e., length and hashes) about the target (or
12521258
the lack of any such metadata).
12531259

1254-
* **4.4.2.2**. If the current delegation is a terminating delegation,
1260+
* **4.5.2.2**. If the current delegation is a terminating delegation,
12551261
then jump to step 5.
12561262

1257-
* **4.4.2.3**. Otherwise, if the current delegation is a non-terminating
1263+
* **4.5.2.3**. Otherwise, if the current delegation is a non-terminating
12581264
delegation, continue processing the next delegation, if any. Stop the
12591265
search, and jump to step 5 as soon as a delegation returns a result.
12601266

0 commit comments

Comments
 (0)