Mojira Archive
MC-14543

Inventory click with negative slot can crash server - INVALID

since: Minecraft 1.4

Container.clickItem() for shift-clicking (third parameter ("mode") is 2, second parameter ("button") is >=0 && <9) does not check if the first parameter ("slot") is less than zero.
This will cause a IndexOutOfBoundsException if a malicious client sends a packet with a values like -1.

The same issue occurs with painting, but that crash has not been verified (more aggressive checking).

All other "modes" check for if the slot number is negative before attempting a get on the slot list.

Invalid

Riking (Kane York)

2013-04-24, 07:00 AM

2013-04-30, 01:41 AM

2013-04-30, 01:41 AM

0

1

Unconfirmed

click, crash, exploit, inventory, packets

Minecraft 1.5

-