The vulnerability lies in an uncontrolled resource consumption issue within Synapse's worker lock handling, leading to a denial of service. When a worker process attempts to acquire a lock that is already held, it enters a waiting state with an exponential backoff retry mechanism. The flaw was that this backoff interval was not capped.
The analysis of the patch commit 3f58bc50dfba5768ee43ce48c5e74c25ba0b078a reveals that the methods WaitingLock._get_next_retry_interval and WaitingMultiLock._get_next_retry_interval implemented this flawed logic (self._retry_interval = max(5, next * 2)), causing the wait time to grow exponentially without limit. This could cause the timeout to become so large that the worker process would effectively freeze, unable to process any further requests, thus denying service to other users. The commit message's reference to a ValueError for integer string conversion confirms that the timeout value could grow to an astronomical size.
The vulnerable functions are WaitingLock.__aenter__ and WaitingMultiLock.__aenter__ in synapse/handlers/worker_lock.py, as they orchestrate the lock acquisition and the vulnerable waiting loop. An attacker could trigger this by causing persistent lock contention, forcing workers into this state of indefinite waiting.
The patch remediates this by replacing the unbounded backoff with a capped one. The new _increment_timeout_interval method ensures the timeout does not exceed 60 seconds, preventing the worker from becoming permanently stuck.