bug: calling /createRoom with the same payload concurrently allows several rooms to own the same canonical alias #2656

Open
opened 2026-12-05 15:10:30 +00:00 by nex · 0 comments
Owner

What is the bug?

While I was testing a modification to Draupnir, I ran a command that made it create a policy list room. For some reason, this command was ran twice at the same time, which made Draupnir create two rooms. However, because it created the same room twice, the createRoom payload was the same. Normally, one of the requests would be rejected since two rooms can't have the same canonical alias, but Continuwuity happily created two identical rooms with the same m.room.canonical_alias. Obviously, because of how the db is structured, only one of these rooms actually has the canonical alias, but still one of the requests should've been rejected.

This is likely due to the workaround added to v12 rooms that allowed the same room to be created in parallel. Something something singular global mutex (/j)

Steps to reproduce

  1. Call /createRoom with the same payload two or more times in the same millisecond, with the same alias set.
  2. Bob's your uncle

Server name and version

nexy7574.co.uk v26.11.0 134211d0ec

Additional context

No response

### What is the bug? While I was testing a modification to Draupnir, I ran a command that made it create a policy list room. For some reason, this command was ran twice at the same time, which made Draupnir create two rooms. However, because it created the same room twice, the `createRoom` payload was the same. Normally, one of the requests would be rejected since two rooms can't have the same canonical alias, but Continuwuity happily created two identical rooms with the same `m.room.canonical_alias`. Obviously, because of how the db is structured, only one of these rooms actually *has* the canonical alias, but still one of the requests should've been rejected. This is likely due to the workaround added to v12 rooms that allowed the same room to be created in parallel. Something something singular global mutex (/j) ### Steps to reproduce 1. Call `/createRoom` with the same payload two or more times in the same millisecond, with the same `alias` set. 2. Bob's your uncle ### Server name and version nexy7574.co.uk v26.11.0 134211d0eca46b8a8ff633bba0a1ec30e6c8e3df ### Additional context _No response_
Sign in to join this conversation.
No milestone
No assignees
1 participant
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#2656
No description provided.