theupdateframework / theupdateframework/rust-tuf

rust-tuf should not deserialize metadata until it has been verified

Open
#291 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
198
Forks
39
Avg merge
9h 19m
Merged PRs (30d)
2

Description

It's possible that a parser bug could allow for a man-in-the-middle attacker to compromise a system. None have been found so far in serde_json, but other parsers have had bugs like this, see CVE-2017-18349. We would like to modify rust-tuf to only deserialize metadata after it has been verified, either by hash or signature.

Unfortunately, there are a few challenges here.

  • POUF-1 embeds the signatures into the role metadata.
  • The TUF-1.0.5 spec itself implies that metadata is parsed before validation in sections 5.3.1 and 5.4.1 in order to verify metadata versions before signatures. In https://github.com/theupdateframework/specification/pull/112, I've proposed moving this check to after signature verification.
  • rust-tuf isn't careful on when deserialization happens.

We should address these to protect ourselves from these attacks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by reading the metadata parsing and verification behavior described in this issue, then compare it with TUF sections 5.3.1 and 5.4.1 and the linked POUF-1 material. Done means metadata is deserialized only after hash or signature verification, while the listed version-check and embedded-signature challenges are addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.