Skip to content

fix(paper): prevent server stalls from inventory holder snapshots - #97

Merged
TheSilentPro merged 1 commit into
SilentDevelopment:masterfrom
noctiro:master
Oct 15, 2026
Merged

TheSilentPro merged 1 commit into
SilentDevelopment:masterfrom
noctiro:master

Conversation

@noctiro

@noctiro noctiro commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Prevent HeadDB's GUI holder checks from creating unnecessary block entity snapshots during inventory click and close events.

This behavior can be abused to cause a server-wide denial of service, potentially resulting in a watchdog-triggered shutdown.

Root cause

Normal container clicks pass through multiple HeadDB menu handlers, even when the player is not using a HeadDB menu.

These handlers call Inventory#getHolder() to identify custom menu holders. For block inventories, this creates a block entity snapshot, which serializes and deserializes the container contents. With deeply nested item data, this work can be expensive.

@TheSilentPro
TheSilentPro self-requested a review October 15, 2026 18:40
@TheSilentPro
TheSilentPro merged commit 771a57b into SilentDevelopment:master Oct 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants