security: sweep-proof result slots, verified-login gate, panic cleanup, Velocity secret#2513
Open
kodareef5 wants to merge 14 commits into
Open
security: sweep-proof result slots, verified-login gate, panic cleanup, Velocity secret#2513kodareef5 wants to merge 14 commits into
kodareef5 wants to merge 14 commits into
Conversation
Worker-thread panics previously called stop_server() via the global panic hook, turning every reachable unwrap into a full-server kill switch. Log and save a crash report, abort the task, and keep serving. Main-thread panics remain fatal.
kodareef5
force-pushed
the
hardening/05-hardening-rework
branch
from
July 24, 2026 23:44
e433591 to
acb17fe
Compare
Add a depth budget for binary and serde NBT parsers so nested compounds cannot stack-overflow the process. Reject non-empty END-typed lists and bound string allocations. Includes regression tests.
kodareef5
force-pushed
the
hardening/05-hardening-rework
branch
from
July 24, 2026 23:55
acb17fe to
5d95d66
Compare
added 12 commits
July 25, 2026 00:03
Cap SClickSlot changed-slot arrays, IDSet/consumable effect lengths, ACK range expansion, and potion hidden-effect nesting so wire lengths cannot drive multi-gigabyte allocations or stack overflow.
Reject oversized split_size before allocating fragment vectors, limit pending split compounds and ordered-channel queues, and bound unacked outgoing frames so a never-ACK or split-bomb peer cannot retain unbounded memory.
Mirror the binary NBT depth budget in the command SNBT parser so deeply nested compounds/lists from /give and similar paths cannot overflow the stack.
Return after failed Mojang authentication instead of completing login with an unverified profile. Kick cleanly when the game profile is missing. Run ban/whitelist/IP-ban and duplicate UUID/name checks in add_player for every transport. Validate player names (reject empty/NUL/section sign), timeout Mojang HTTP, fix prevent-proxy URL, and sanitize Velocity names.
Require a non-empty RCON password and Velocity secret when those features are enabled. Warn when BungeeCord mode is on. Fix RCON max_connections to decrement on close, and add read timeouts plus an incoming buffer bound.
Block PickupAll on merchant and anvil result slots, enforce trade uses limits, consume both anvil inputs, fix drag-slot division-by-zero from u8 cast wrap, and correct Swap action operator precedence for offhand.
Require creative mode for CraftCreative and client inventory descriptors, consume craft inputs per repetition, require allow_flying for StartFlying, ignore invalid block actions without panicking, and make heal() tolerant of overflowed potion amplifiers.
…take Merchant and anvil result slots are take-only so PickupAll cannot steal outputs without consumption. Crafting ResultSlot refills after each take so multi-craft loops stop when ingredients run out.
Reject CreatedOutput without a tracked craft, bound HotBar slot ids, and stop survival UseItem from writing client item descriptors into the held stack.
Gate LoginAck on finish_login, clear profiles after failed Mojang auth, prefer close in get_packet select, accept reconnects by kicking the old session, and reject section-sign Bedrock names.
…icks Run play loops in child tasks so connection cleanup always runs, save only the first worker crash report to disk, and keep the ticker alive if a single tick panics.
Bound item user/extra data allocations at 256 KiB and reject empty or whitespace Velocity secrets whenever velocity is enabled.
kodareef5
force-pushed
the
hardening/05-hardening-rework
branch
from
July 25, 2026 00:38
5d95d66 to
155f751
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 5 of the hardening stack (stacked on #2512).
Commits
What and why
Tests
cargo test passes for pumpkin-inventory, pumpkin-protocol, and pumpkin (including take-only slot tests).