bug: Rejected events can end up in the current room state #2616

Open
opened 2026-11-27 22:57:44 +00:00 by eleboucher · 1 comment
Contributor

What is the bug?

A rejected event can end up in the current room state. After that, every event that uses it as an auth event gets rejected, including our own make_join template, so the user is stuck in the room.

iterative_auth_check never checks whether an event was rejected (see the two TODOs in state_res/mod.rs). Synapse skips rejected events there.

Steps to reproduce

  1. Server A rejects a membership event X. Server B accepts it.
  2. B sends a state event whose prev events A doesn't have.
  3. A fetches state from B, which contains X.
  4. derive_new_state resolves it against current state and X is admitted.
  5. Every new event for that user on A fails with "Event has rejected auth event: X".

Server name and version

plz.pet 26.9.4 (dda4bdc)

Additional context

Seen in a restricted v12 room. A remote join through plz.pet failed with:
send_join failed: [403 / M_FORBIDDEN] Event has rejected auth event: $DauUuWJTE19VSdh1niXN2MwGg_PYsMCf0Fv616mqn3s

### What is the bug? A rejected event can end up in the current room state. After that, every event that uses it as an auth event gets rejected, including our own make_join template, so the user is stuck in the room. iterative_auth_check never checks whether an event was rejected (see the two TODOs in state_res/mod.rs). Synapse skips rejected events there. ### Steps to reproduce 1. Server A rejects a membership event X. Server B accepts it. 2. B sends a state event whose prev events A doesn't have. 3. A fetches state from B, which contains X. 4. derive_new_state resolves it against current state and X is admitted. 5. Every new event for that user on A fails with "Event has rejected auth event: X". ### Server name and version plz.pet 26.9.4 (dda4bdc) ### Additional context Seen in a restricted v12 room. A remote join through plz.pet failed with: send_join failed: [403 / M_FORBIDDEN] Event has rejected auth event: $DauUuWJTE19VSdh1niXN2MwGg_PYsMCf0Fv616mqn3s
Owner

This can probably be patched in our site-local event auth. Readers may also wish to see !2408

This can probably be patched in our site-local event auth. Readers may also wish to see !2408
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
continuwuation/continuwuity#2616
No description provided.