Mojira Archive
MC-229761

ServerboundContainerClickPacket and ServerboundEditBookPacket allow DoS attack

The bug

1.17.1-pre1 Mojang names

The following has not been tested, it is only based on the decompiled source code.

The packets ServerboundContainerClickPacket and ServerboundEditBookPacket seem to allow denial of service (DoS) attacks because they create lists and maps of user controlled size, allowing usage of unlimited amount of memory.
The underlying issue is that the methods FriendlyByteBuf.readCollection(IntFunction, Function) and FriendlyByteBuf.readMap(IntFunction, Function, Function) call the allocator IntFunction with the user-controlled size without any validation / restriction.

Fixed

Marcono1234

[Mojang] Bartosz Bok

2021-06-20, 11:31 PM

2022-05-15, 12:30 AM

2021-06-29, 03:30 PM

2

2

Plausible

Important

Networking

1.17.1 Pre-release 1

1.17.1 Pre-release 2