GrimAnticheat / Grim

Fully async, multithreaded, predictive, open source, 3.01 reach, 1.005 timer, 0.01% speed, 99.99% antikb, "bypassable" 1.8-1.20 anticheat.
GNU General Public License v3.0
1.09k stars 327 forks source link

Offline mode WrapperLoginServerLoginSuccess out of bounds exception #363

Closed MWHunter closed 2 years ago

MWHunter commented 2 years ago

[22:32:09 WARN]: PacketEvents caught an unhandled exception while calling your listener. java.lang.IndexOutOfBoundsException: readerIndex: 48 (expected: 0 <= readerIndex <= writerIndex(31)) at io.netty.buffer.AbstractByteBuf.readerIndex(AbstractByteBuf.java:73) ~[patched_1.8.8.jar:git-PaperSpigot-445] at io.github.retrooper.packetevents.netty.buffer.ByteBufOperatorModernImpl.readerIndex(ByteBufOperatorModernImpl.java:34) ~[grim.jar:?] at com.github.retrooper.packetevents.netty.buffer.ByteBufHelper.readerIndex(ByteBufHelper.java:31) ~[grim.jar:?] at com.github.retrooper.packetevents.wrapper.PacketWrapper.readString(PacketWrapper.java:370) ~[grim.jar:?] at com.github.retrooper.packetevents.wrapper.login.server.WrapperLoginServerLoginSuccess.read(WrapperLoginServerLoginSuccess.java:66) ~[grim.jar:?] at com.github.retrooper.packetevents.wrapper.PacketWrapper.readEvent(PacketWrapper.java:152) ~[grim.jar:?] at com.github.retrooper.packetevents.wrapper.PacketWrapper.(PacketWrapper.java:100) ~[grim.jar:?] at com.github.retrooper.packetevents.wrapper.PacketWrapper.(PacketWrapper.java:90) ~[grim.jar:?] at com.github.retrooper.packetevents.wrapper.login.server.WrapperLoginServerLoginSuccess.(WrapperLoginServerLoginSuccess.java:37) ~[grim.jar:?] at com.github.retrooper.packetevents.manager.InternalPacketListener.onPacketSend(InternalPacketListener.java:58) ~[grim.jar:?] at com.github.retrooper.packetevents.event.PacketSendEvent.call(PacketSendEvent.java:47) ~[grim.jar:?] at com.github.retrooper.packetevents.event.EventManager.callEvent(EventManager.java:53) [grim.jar:?] at com.github.retrooper.packetevents.util.PacketEventsImplHelper.handleClientBoundPacket(PacketEventsImplHelper.java:37) [grim.jar:?] at io.github.retrooper.packetevents.injector.latest.handlers.PacketEncoderLatest.encode(PacketEncoderLatest.java:59) [grim.jar:?] at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) [patched_1.8.8.jar:git-PaperSpigot-445] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:658) [patched_1.8.8.jar:git-PaperSpigot-445] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:716) [patched_1.8.8.jar:git-PaperSpigot-445] at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:706) [patched_1.8.8.jar:git-PaperSpigot-445] at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:741) [patched_1.8.8.jar:git-PaperSpigot-445] at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:895) [patched_1.8.8.jar:git-PaperSpigot-445] at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:240) [patched_1.8.8.jar:git-PaperSpigot-445] at net.minecraft.server.v1_8_R3.NetworkManager$4.run(NetworkManager.java:198) [patched_1.8.8.jar:git-PaperSpigot-445] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:380) [patched_1.8.8.jar:git-PaperSpigot-445] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:357) [patched_1.8.8.jar:git-PaperSpigot-445] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [patched_1.8.8.jar:git-PaperSpigot-445] at java.lang.Thread.run(Thread.java:833) [?:?]

Caused by joining an offline mode server with an offline account. MultiMC playing in offline mode can be used for this

MWHunter commented 2 years ago

{"extra":[{"color":"yellow","text":"DefineOutside joined the game"}],"text":""}

The server is misreading what protocol state the player is in. Causing PacketEvents to see it as a handshake packet instead of a chat message

retrooper commented 2 years ago

Transfer this issue into packetevents.

retrooper commented 2 years ago

Click the "Transfer issue" button

MWHunter commented 2 years ago

Fixed by https://github.com/retrooper/packetevents/commit/fed8b95199f2b5daf401786245092f5446a258b5