Server DoS
The analytics are based off the mappings provided
Whenever player attempts to enchant an item, for example, the client sends ServerboundContainerButtonClickPacket packet that contains the container id and button id. The button id is used in an echantment table container code to determinate which level players wants to use to enchant an item.
How the code looks and where is the problem (EnchantmentMenu):
It is obvious that if the client requests an invalid button, the server will encount an error, potentially crashing under stress.
There are might be some other menus that are vulnerable to this, I did not check.
The second thing is this (ServerGamePacketListenerImpl);
What this does seems obvious: send any changes to the listeners of the menu if there are any, however, the client can spam this packet in any menu, potentially frezzing server thread.
This happens because of how the server compares two item stacks to check whether they need to be resend or not (The server compares copies of two stacks, so it is not the same reference, thus, causing the comparsion of NBT tags).
The second packet is ServerboundContainerClickPacket. The client might send a slot index that is greater than the inventory size and cause the server to spam errors.
setRemoteSlotNoCopy method is also vulnerable to that.
ServerboundUseItemOnPacket does not check the position the client sends, thus, the client is capable of loading chunks in random places.
From what I see there is no exception handling that might kick the client if the connection encounts an error from such factors, making the situation worse.
2021-12-12, 07:43 PM
2022-02-17, 08:56 AM
2022-02-17, 08:56 AM
0
1