-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Unable to backfill due to invalid event signature from key ed25519:key1
#8339
Comments
The signature of these events are invalid. Synapse seems to not care when receiving these events via a transaction, but does care when we're backfilling. Thus we end up with existing servers in the room carrying on happily, while new joiners are affected. When we backfill, we pull the requested events out of the database here: synapse/synapse/handlers/federation.py Line 1842 in d4a7829
Filter them for redaction/erased user reasons, and then happily serve them up without checking signatures. Testing this myself, I tried backfilling from a remote server (both of us on v1.19.2) and the remote server served the invalid events with a The server that requested the backfill is the one that's validating the events. That validation is done here: synapse/synapse/federation/federation_client.py Lines 220 to 225 in c570f24
In this case we're rejecting the whole backfill and trying another server, which gives us the same events, try another server, and so on... After iterating through many servers, I eventually hit one that returned a 403. Synapse then backed out of the loop and awkwardly returned a My conclusion is that instead of bailing out of the backfill, we should do the same as if we were receiving a transaction from another server - reject or drop the invalid event but keep the others if they're OK. |
Does this in any way break the DAG structure of past rooms, if a single (critical) link within the room is not accepted? Could that be remedied by servers constructing manual merges in dummy events (upon detection) to ensure DAG continuity? (For instance, reference the last event with a valid signature, following from the first event in the room, and then reference the latest event in the room, this effectively allows the DAG to be "semi-valid" by having a clean link to the first valid events in the room. The thing to be decided from thereon out is how to handle the "invalid" events in the leftover DAG. |
this is a dup of #3121 |
Also a dup of #8339 |
it is indeed suspiciously similar to #8339... |
@jboi:jboi.nl
is unable to backfill from other servers in #twim:matrix.org as their unable to validate the signature of an event fromconduit.rs
. From jboi.nl:@jboi:jboi.nl
successfully joined the room today at 13:43 BST, but receive this exception repeatedly in their logs upon trying to scroll up in the room.Timo, conduit's developer, says:
@jboi:jboi.nl
is running Synapse v1.19.2.The text was updated successfully, but these errors were encountered: