Fix 3 RCEs in packet parsing and texture loading#1091
Draft
JuelzIrons wants to merge 3 commits intosmartcmd:mainfrom
Draft
Fix 3 RCEs in packet parsing and texture loading#1091JuelzIrons wants to merge 3 commits intosmartcmd:mainfrom
JuelzIrons wants to merge 3 commits intosmartcmd:mainfrom
Conversation
codeHusky
requested changes
Mar 10, 2026
Minecraft.Client/Durango/Network/DQRNetworkManager_SendReceive.cpp
Outdated
Show resolved
Hide resolved
Minecraft.Client/Durango/Network/DQRNetworkManager_SendReceive.cpp
Outdated
Show resolved
Hide resolved
not sure if this is what you meant by 'could you document where this maximum comes from in the code' but i assume you meant this
Author
|
I decreased the limit to 512kb + added comments as to why its 512kb 512 is still on the forgiving side still but it still prevents the overflow |
|
Curious, is this actually an exploitable RCE? |
Collaborator
|
Is this limit theoretically sufficient for, say, 90 players of information? We shouldn’t be setting limits for low player counts realistically |
Author
No not at all. I was just thinking of the default 8 that the game supports not keeping the servers having more in mind |
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.
Description
This PR fixes 2 RCE vulnerabilities in Packet Parsing and 1 in texture loading
Changes
Previous Behavior
packets with crafted RoomSyncData or AddPlayerFailed sizes had no validation, allowing integer overflow and unbounded heap allocation and wsprintfW in AbstractTexturePack.cpp had no size limit on the output buffer.
Root Cause
Old code had no bounds checking on network packet sizes, and wsprintfW had no buffer size parameter.
New Behavior
Packet sizes are validated and capped before allocation. swprintf_s enforces buffer size on string formatting.
Fix Implementation
wsprintfWreplaced withswprintf_swithLOCATOR_SIZEin AbstractTexturePack.cppRoomSyncData and AddPlayerFailed packet parsing now reads size into
receivedSize, rejects if< 0 || > 100000, checkstotalSizefor integer overflow before allocatingAI Use Disclosure
No AI was used in the discovery or patching of these RCEs
Related Issues
N/A