{"action":"created","issue":{"url":"https://api.github.com/repos/theupdateframework/specification/issues/12","repository_url":"https://api.github.com/repos/theupdateframework/specification","labels_url":"https://api.github.com/repos/theupdateframework/specification/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/theupdateframework/specification/issues/12/comments","events_url":"https://api.github.com/repos/theupdateframework/specification/issues/12/events","html_url":"https://github.com/theupdateframework/specification/issues/12","id":298389619,"number":12,"title":"What is the purpose of listing current root.json version in the snapshot.json?","user":{"login":"reider-roque","id":6162309,"avatar_url":"https://avatars1.githubusercontent.com/u/6162309?v=4","gravatar_id":"","url":"https://api.github.com/users/reider-roque","html_url":"https://github.com/reider-roque","followers_url":"https://api.github.com/users/reider-roque/followers","following_url":"https://api.github.com/users/reider-roque/following{/other_user}","gists_url":"https://api.github.com/users/reider-roque/gists{/gist_id}","starred_url":"https://api.github.com/users/reider-roque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reider-roque/subscriptions","organizations_url":"https://api.github.com/users/reider-roque/orgs","repos_url":"https://api.github.com/users/reider-roque/repos","events_url":"https://api.github.com/users/reider-roque/events{/privacy}","received_events_url":"https://api.github.com/users/reider-roque/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-02-19T20:12:19Z","updated_at":"2018-02-28T15:14:17Z","closed_at":null,"author_association":"NONE","body":"> https://github.com/theupdateframework/specification/blob/master/tuf-spec.md\r\n> 4.4. File formats: snapshot.json                                                                                                                                                                                 \r\n> The snapshot.json file is signed by the snapshot role. It lists the version                                                                                                                                      \r\n> numbers of all metadata on the repository, excluding timestamp.json and                                                                                                                                          \r\n> mirrors.json. For the root role, the hash(es), size, and version number are                                                                                                                                      \r\n> listed.                                                                                                                                                                                                          \r\n                                                                                                                                                                                                                   \r\nWhat is the purpose of listing current root.json version in the snapshot.json?                                                                                                                                                  \r\n                                                                                                                                                                                                                   \r\nInitially I thought that once you rotate any keys, the root.json will get                                                                                                                                          \r\nupdated, its version will be bumped and the snapshot.json will get that version.                                                                                                                                   \r\nAs a chain reaction the snapshot.json hash in the timestamp.json will be updated                                                                                                                                   \r\nas well. If an update client were to only periodically download                                                                                                                                                    \r\nthe timestamp.json file to answer the 'Is updated available?' question, then it                                                                                                                                    \r\nwould make sense: one of the keys in root.json is updated -> root.json version is                                                                                                                                  \r\nbumped -> snapshot.json is updated with the new root.json version ->                                                                                                                                               \r\ntimestamp.json is updated with the new snapshot.json hash -> client fetches the                                                                                                                                    \r\ntimestamp.json -> client sees the snapshot.json hash is updated -> client                                                                                                                                          \r\nfetches the snapshot.json -> client sees the version of the root.json is updated                                                                                                                                   \r\n-> client fetches the root.json -> client updates trusted keys for this                                                                                                                                            \r\nrepository.                                                                                                                                                                                                        \r\n                                                                                                                                                                                                                   \r\nHowever, the first step of the `5. Detailed Workflows` section requires that the                                                                                                                                   \r\nroot.json file is fetched and checked for changes prior to fetching of the                                                                                                                                         \r\ntimestamp.json file. And it makes sense to do this because if the                                                                                                                                                  \r\nleast-privileged online timestamp key(s) is compromised and write permissions to                                                                                                                                   \r\nthe repository storage are acquired, the attacker will be able to keep                                                                                                                                             \r\nrefreshing timestamp.json keeping the snapshot.json hash stale and preventing                                                                                                                                      \r\nupdates.                                                                                                                                                                                                           \r\n                                                                                                                                                                                                                   \r\nWith that being said I can't figure out the purpose of mentioning root.json                                                                                                                                        \r\nversion in the snapshot.json.                                                 "},"comment":{"url":"https://api.github.com/repos/theupdateframework/specification/issues/comments/369270570","html_url":"https://github.com/theupdateframework/specification/issues/12#issuecomment-369270570","issue_url":"https://api.github.com/repos/theupdateframework/specification/issues/12","id":369270570,"user":{"login":"reider-roque","id":6162309,"avatar_url":"https://avatars1.githubusercontent.com/u/6162309?v=4","gravatar_id":"","url":"https://api.github.com/users/reider-roque","html_url":"https://github.com/reider-roque","followers_url":"https://api.github.com/users/reider-roque/followers","following_url":"https://api.github.com/users/reider-roque/following{/other_user}","gists_url":"https://api.github.com/users/reider-roque/gists{/gist_id}","starred_url":"https://api.github.com/users/reider-roque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reider-roque/subscriptions","organizations_url":"https://api.github.com/users/reider-roque/orgs","repos_url":"https://api.github.com/users/reider-roque/repos","events_url":"https://api.github.com/users/reider-roque/events{/privacy}","received_events_url":"https://api.github.com/users/reider-roque/received_events","type":"User","site_admin":false},"created_at":"2018-02-28T15:14:17Z","updated_at":"2018-02-28T15:14:17Z","author_association":"NONE","body":"> Regarding the freeze attack in your third paragraph: if I understand\r\ncorrectly, your attacker is not impacted by the change in workflows: if they're\r\njust going to keep signing new timestamps and snapshots that indicate no change,\r\nthey are equally able to continue serving the same stale root.json file, until\r\nit expires. (The client should detect expiry regardless of which of the two\r\nworkflows it's employing). I'm not sure if you're saying that the attack is\r\nmitigated by the workflow change, but I thought it best to clarify.\r\n\r\nAgreed. The attacker is not impacted. The client update flow in case of all\r\ntimestamp keys rotation is.\r\n\r\nWith the old flow, in case when all N timestamp keys were compromised, once you\r\nrotate them and re-sign the timestamp.json, the client will be tripping over not\r\nbeing able to verify the timestamp.json. It'll need the logic of falling back to\r\nfetching root.json to potentially update the rotated timestamp keys before\r\nretrying fetching of the timestamp.json.\r\n\r\nWith the new flow, in the same compromise case, the client will learn about new\r\ntimestamp keys as soon as it fetches the updated root.json, which is the first\r\nthing being fetched in the new flow."}}
{"actor":{"display_login":"reider-roque"}}