Skip to content

Commit e320a2e

Browse files
committed
Clarify what files to delete in various situations to recover from a fast-forward attack. In addition, this adds additional rollback protection in the event of a timestamp compromise.
1 parent 0f56aee commit e320a2e

File tree

1 file changed

+37
-16
lines changed

1 file changed

+37
-16
lines changed

tuf-spec.md

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,16 +1116,26 @@ repo](https://github.com/theupdateframework/specification/issues).
11161116
cycle, report the potential freeze attack. On the next update cycle, begin
11171117
at step 0 and version N of the root metadata file.
11181118

1119-
* **1.9**. **If the timestamp and / or snapshot keys have been rotated, then
1120-
delete the trusted timestamp and snapshot metadata files.** This is done in
1121-
order to recover from fast-forward attacks after the repository has been
1122-
compromised and recovered. A _fast-forward attack_ happens when attackers
1123-
arbitrarily increase the version numbers of: (1) the timestamp metadata, (2)
1124-
the snapshot metadata, and / or (3) the targets, or a delegated targets,
1125-
metadata file in the snapshot metadata. Please see [the Mercury
1126-
paper](https://ssl.engineering.nyu.edu/papers/kuppusamy-mercury-usenix-2017.pdf)
1119+
* **1.9**. **Fast-forward attack recovery** A _fast-forward attack_ happens
1120+
when attackers arbitrarily increase the version numbers of: (1) the timestamp
1121+
metadata, (2) the snapshot metadata, and / or (3) the targets, or a delegated
1122+
targets, metadata file in the snapshot metadata. To recover from fast-forward
1123+
attacks after the repository has been compromised and recovered, certain
1124+
metadata files need to be deleted as specified in this section. Please see
1125+
[the Mercury paper](https://ssl.engineering.nyu.edu/papers/kuppusamy-mercury-usenix-2017.pdf)
11271126
for more details.
11281127

1128+
* **1.9.1**. **Targets recovery** If a threshold of targets keys are removed
1129+
from the root metadata, delete the old targets, snapshot, and timestamp
1130+
metadata files.
1131+
1132+
* **1.9.2**. **Snapshot recovery** If a threshold of snapshot keys are
1133+
removed from the root metadata, delete the old snapshot and timestamp
1134+
metadata files.
1135+
1136+
* **1.9.3**. **Timestamp recovery** If a threshold of timestamp keys are
1137+
removed from the root metadata, delete the old timestamp metadata files.
1138+
11291139
* **1.10**. **Set whether consistent snapshots are used as per the trusted
11301140
root metadata file** (see Section 4.3).
11311141

@@ -1222,36 +1232,47 @@ non-volatile storage as FILENAME.EXT.
12221232
trusted root metadata file. If the new targets metadata file is not signed
12231233
as required, discard it, abort the update cycle, and report the failure.
12241234

1225-
* **4.3**. **Check for a freeze attack.** The latest known time should be
1235+
* **4.3**. **Check for a rollback attack.** The version number of the trusted
1236+
targets metadata file, if any, MUST be less than or equal to the version
1237+
number of the new targets metadata file. If the new targets metadata file is
1238+
older than the trusted targets metadata file, discard it, abort the update
1239+
cycle, and report the potential rollback attack.
1240+
1241+
* **4.4**. **Check for a freeze attack.** The latest known time should be
12261242
lower than the expiration timestamp in the new targets metadata file. If so,
12271243
the new targets metadata file becomes the trusted targets metadata file. If
12281244
the new targets metadata file is expired, discard it, abort the update cycle,
12291245
and report the potential freeze attack.
12301246

1231-
* **4.4**. **Perform a preorder depth-first search for metadata about the
1247+
* **4.5**. **Fast-forward attack recovery** If a threshold of delegated
1248+
targets keys for a role are removed from the delegating targets metadata,
1249+
delete the old delegated targets metadata for that role along with the
1250+
snapshot and timestamp metadata.
1251+
1252+
* **4.6**. **Perform a preorder depth-first search for metadata about the
12321253
desired target, beginning with the top-level targets role.** Note: If
12331254
any metadata requested in steps 4.4.1 - 4.4.2.3 cannot be downloaded nor
12341255
validated, end the search and report that the target cannot be found.
12351256

1236-
* **4.4.1**. If this role has been visited before, then skip this role (so
1257+
* **4.6.1**. If this role has been visited before, then skip this role (so
12371258
that cycles in the delegation graph are avoided). Otherwise, if an
12381259
application-specific maximum number of roles have been visited, then go to
12391260
step 5 (so that attackers cannot cause the client to waste excessive
12401261
bandwidth or time). Otherwise, if this role contains metadata about the
12411262
desired target, then go to step 5.
12421263

1243-
* **4.4.2**. Otherwise, recursively search the list of delegations in order
1264+
* **4.6.2**. Otherwise, recursively search the list of delegations in order
12441265
of appearance.
12451266

1246-
* **4.4.2.1**. If the current delegation is a multi-role delegation,
1267+
* **4.6.2.1**. If the current delegation is a multi-role delegation,
12471268
recursively visit each role, and check that each has signed exactly the
12481269
same non-custom metadata (i.e., length and hashes) about the target (or
12491270
the lack of any such metadata).
12501271

1251-
* **4.4.2.2**. If the current delegation is a terminating delegation,
1272+
* **4.6.2.2**. If the current delegation is a terminating delegation,
12521273
then jump to step 5.
12531274

1254-
* **4.4.2.3**. Otherwise, if the current delegation is a non-terminating
1275+
* **4.6.2.3**. Otherwise, if the current delegation is a non-terminating
12551276
delegation, continue processing the next delegation, if any. Stop the
12561277
search, and jump to step 5 as soon as a delegation returns a result.
12571278

@@ -1381,7 +1402,7 @@ non-volatile storage as FILENAME.EXT.
13811402
snapshots are not written by the repository, then the attribute may either
13821403
be left unspecified or be set to the False value. Otherwise, it must be
13831404
set to the True value.
1384-
1405+
13851406
Regardless of whether consistent snapshots are ever used or not, all
13861407
released versions of root metadata files should always be provided
13871408
so that outdated clients can update to the latest available root.

0 commit comments

Comments
 (0)