[Exploit] Spamming ServerboundFinishConfigurationPacket causes chunk lag & TPS drops

Open
#520 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
java

Research direction

Start by tracing handling for ServerboundFinishConfigurationPacket and the transition from the configuration phase to the Game phase. Reproduce the repeated-packet case described in the issue, then verify that extra packets no longer produce network-thread exceptions or cause chunk lag and TPS drops.

Written by the indexing model from the issue text.

Description

status: needs triage type: performance
Profile link

https://github.com/Keoos1337

Description of issue

If a player sends a large number of ServerboundConfigurationFinishConfiguration packets, chunks around the sender start to lag and server TPS drops.
This packet is a terminal packet. After the first receipt, the server disables its outbound protocol and waits for the main thread to finish switching to the Game phase. During this async gap, extra packets are processed in an invalid state, throwing exceptions on the network thread that compete with chunk/entity ticking.

Plugin and Datapack List

none

Server config files

Default configuration

Folia version

1.21.11 latest

Other

No response

Dominant language
Shell
Stars
4.7k
Forks
651
Avg merge
10d 3h
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from PaperMC/Folia

All issues in PaperMC/Folia

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.