matrix-org / matrix-org/matrix-spec

`unsigned` should be stripped of disallowed keys when received over S2S

Open
#1,524 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

clarification
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

We should spell out the fact that the unsigned field of PDUs received over S2S should be stripped of everything except an explicitly allowed set of keys, to prevent issues as described in https://github.com/matrix-org/synapse/issues/11080.

Synapse already has mitigations for this, as does Dendrite.

Contributor guide

Open the contributing guide

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

Start by locating the Matrix specification's S2S PDU definitions and reviewing the linked Synapse mitigation and Dendrite PR for how they handle unsigned fields. Update the relevant specification wording to state that disallowed unsigned keys are stripped, with the explicitly allowed set defined, and ensure it addresses the concern in issue 11080.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.