MirrorNetworking / MirrorNetworking/Mirror

ReadyMessage spam -> forced observer rebuilds

Open
#2,623 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug security
Dominant language
C#
Stars
6.3k
Forks
870
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
A malicious client can send as many ReadyMessages as they want and cause observers to be rebuilt every time (potentially slow):
https://github.com/vis2k/Mirror/blob/64f247fb32e49e833f4e243ef051056cd3a056df/Assets/Mirror/Runtime/NetworkManager.cs#L1073-L1078
https://github.com/vis2k/Mirror/blob/64f247fb32e49e833f4e243ef051056cd3a056df/Assets/Mirror/Runtime/NetworkManager.cs#L1176-L1184
https://github.com/vis2k/Mirror/blob/64f247fb32e49e833f4e243ef051056cd3a056df/Assets/Mirror/Runtime/NetworkServer.cs#L668-L678

Expected behavior
NetworkServer.SetClientReady should return early if isReady is already true (this might break stuff, I'm not too familiar with the ready part of the code)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Assets/Mirror/Runtime/NetworkServer.cs around SetClientReady, then trace the ReadyMessage handling in NetworkManager.cs at the referenced lines. Confirm how repeated ready messages trigger observer rebuilding and identify the existing ready-state behavior. Done means repeated ReadyMessages no longer rebuild observers for an already-ready client without breaking the ready flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.