Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal for ACLing servers from rooms #1383

Closed
ara4n opened this issue Jul 5, 2018 · 4 comments
Closed

Proposal for ACLing servers from rooms #1383

ara4n opened this issue Jul 5, 2018 · 4 comments
Assignees
Labels
kind:core MSC which is critical to the protocol's success merged A proposal whose PR has merged into the spec! proposal A matrix spec change proposal s2s Server-to-Server API (federation)

Comments

@ara4n
Copy link
Member

ara4n commented Jul 5, 2018

Documentation: https://docs.google.com/document/d/1aiuROf1__7ZFkJvDdAZQfBNxyzjYd-ijiRAcHJYqJCM/edit#heading=h.t1ebd56v2ae6
Author: @richvdh, @ara4n

This proposal is treated as a vulnerability mitigation, and as such was written and reviewed by the core spec team and is now being made public in sync with a fix being made available in Synapse 0.32.0rc1 and the forthcoming urgent Synapse 0.32.0 upgrade.

@ara4n
Copy link
Member Author

ara4n commented Jul 6, 2018

Responding to the comment over at #1308 (comment) from @maxidor:

Disclaimer: Also posting this on behalf of other community members

Who? To be clear: anyone in the community is very very welcome to voice their concerns, and it will make it a lot easier for feedback this to be taken seriously if it's not anonymous, or all being filtered through you (especially given the conflict of interest given your own fork, etc).

So today this happened: #1383

This was a race of a few hours; I'm not sure why it matters?

  • Reviewed by the whole spec team
  • Skipped involving relevant projects in the ecosystem, making the actual review rate at best 50% (synapse, dendrite, construct, mxhsd) and at worst 33% (synapse, dendrite, construct, mxhsd, ruma, plasma)

So last time I checked mxhsd "isn't a thing in Matrix any more", and construct is known to actively attack the federation. It boils down to a question of trust; if Ruma/Plasma/Transform etc had any federation code and their authors weren't forking or attacking the protocol we would have discussed this with them.

  • Skipped community review overall, possibly sending the message the community is not important

...or that we are trying to protect the community from attack whilst we solve the remaining S2S flaws.

  • Straight to passed review (!)

...because it was reviewed under embargo by the core team.

  • And yet, doesn't actually achieve anything as naively bypassed or state reseted in various ways.

As far as we're aware it can only be bypassed or state reseted maliciously by a colluding or noncompliant server (which would then be also banned, in the event of having to use this). If you've found an actual flaw in the proposal please spell it out clearly before we ship the release rather than bragging about undisclosed vulns.

  • Took the community 30 sec to see how flawed it was and, when down to protecting against actual attacks, useless. [1] [2] [3]

Just because 3 people say "i don't understand how this helps much" or "i don't think this should have been handled as a security fix" doesn't make it true. If you'd like to reason it through please feel free.

And the best part of it all might be those quotes from the doc for a security fix, which is... interesting:

... room admins will need to keep the server_acl event updated, and block any servers not updated to handle it.

This is meant as a quick and temporary solution until there is a new version of the room protocol that natively supports server bans.

I don't follow your point here. This is a security feature which is needed to protect the network whilst we finish off fixing state resets (which is progressing well, fwiw). It feels pretty obvious to me that we would develop and ship this under embargo in order to get it out asap to protect the network.

If we had to pick one proposal that could have really used the review process, it was this one.

It's not too late; if you can spell out the bugs in this one (and better yet suggest an alternative) then please feel free.

@ara4n
Copy link
Member Author

ara4n commented Jul 6, 2018

Just responding to the three points you mentioned with permalinks:

you can bypass it, you can state reset it, and it hasn't been debated... just urgh

  • You can only bypass it by relaying traffic by another malicious server (or one which doesn't uphold server_acls). So yes, this solution assumes that such servers would have to also be banned to allow the ACL to stick.
  • You can't reset it because to perform a reset a malicious server has to send sculpted events into the room, which would be grounds to then ban that server. If a non-malicious state reset happened to reset it, then (until state resets are fixed), you'd just have to put it back again.
  • It has been extensively debated by the core spec team.

this patch ... DOESN'T ACTUALLY DO ANYTHING
It's trivial to get servers to pull an event if i'm blocked from pushing them

  • Yes, if a server sends a message which references a 'bad event' from a banned server, then bad events can leak into the DAG (as the proposal makes clear in the 'Potential Problems' section). However, the only way such a server would have got that event in the first place is if a non-compliant server let it into the DAG. So for ACLs to work, all servers in the room have to honour them.

Either that or I'm too stupid to understand the attack here, in which case please do explain it clearly.

I can see the use for per-room federation whitelists, but other than that I have to agree with Jason and Max: this wasn't really a security fix or otherwise worthy of skipping the process and it doesn't even help much

@maunium: you're right that it's probably best described as a security feature rather than a security fix. It was honestly a borderline decision on whether to design & implement this under embargo, but given we want to be able to deploy it as rapidly as possible in the event of abuse, we wanted to make sure we had something ready to go rather than having multiple days where such a feature is on the horizon but not actually deployable. In terms of whether "it doesn't even help much", do the explanations above make sense? Or are we missing something, in which case please let us know before we ship this.

@turt2live turt2live added the s2s Server-to-Server API (federation) label Jul 10, 2018
@richvdh
Copy link
Member

richvdh commented Jul 17, 2018

this has been in production for a couple of weeks, so I guess it's now pr-missing

@richvdh richvdh added spec-pr-missing Proposal has been implemented and is being used in the wild but hasn't yet been added to the spec and removed proposal-passed-review labels Jul 17, 2018
@turt2live
Copy link
Member

Something that came up again is how are servers meant to tell other servers that they are no longer ACL'd? As far as I can tell, if you ACL a server it'll ignore the updated ACL event that unbans itself.

@turt2live turt2live added this to To do: proposals (prioritized) in August 2018 r0 Aug 14, 2018
@turt2live turt2live self-assigned this Aug 22, 2018
turt2live added a commit to turt2live/matrix-doc that referenced this issue Aug 22, 2018
Implements the proposal for matrix-org#1383
@turt2live turt2live mentioned this issue Aug 22, 2018
@turt2live turt2live moved this from To do: proposals (not overly prioritized) to In review in August 2018 r0 Aug 22, 2018
@turt2live turt2live moved this from In review to In review (just the issues) in August 2018 r0 Aug 24, 2018
August 2018 r0 automation moved this from In review (just the issues) to Done (this list will be incomplete) Aug 27, 2018
@richvdh richvdh added merged A proposal whose PR has merged into the spec! proposal A matrix spec change proposal and removed proposal A matrix spec change proposal spec-pr-missing Proposal has been implemented and is being used in the wild but hasn't yet been added to the spec labels Aug 30, 2018
@turt2live turt2live added the kind:core MSC which is critical to the protocol's success label Apr 21, 2020
RiotTranslateBot pushed a commit to RiotTranslateBot/matrix-doc that referenced this issue Aug 22, 2023
The top-level `example` in `edu.yaml` was overriding the individual examples
for `edu_type`. Let's fix that by getting rid of the example in `edu.yaml`.

Fixes matrix-org/matrix-spec#805
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:core MSC which is critical to the protocol's success merged A proposal whose PR has merged into the spec! proposal A matrix spec change proposal s2s Server-to-Server API (federation)
Projects
No open projects
August 2018 r0
  
Done (this list will be incomplete)
Development

No branches or pull requests

3 participants