Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InitialHandler - encountered exception #1622

Closed
kxjhwbb opened this issue Oct 29, 2015 · 2 comments
Closed

InitialHandler - encountered exception #1622

kxjhwbb opened this issue Oct 29, 2015 · 2 comments

Comments

@kxjhwbb
Copy link

kxjhwbb commented Oct 29, 2015

seems like some hack.. I get this warning sometime

16:27:14 [INFO] [/13.194.149.74:4507] <-> InitialHandler has connected
16:27:14 [WARNING] [/13.194.149.74:4507] <-> InitialHandler - encountered exception
io.netty.handler.codec.DecoderException: net.md_5.bungee.protocol.BadPacketException: Did not read all bytes from packet class net.md_5.bungee.protocol.packet.LoginRequest 0 Protocol LOGIN Direction net.md_5.bungee.protocol.Protocol$DirectionData@6086737e
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:278)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:147)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:161)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:150)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at java.lang.Thread.run(Thread.java:745)
Caused by: net.md_5.bungee.protocol.BadPacketException: Did not read all bytes from packet class net.md_5.bungee.protocol.packet.LoginRequest 0 Protocol LOGIN Direction net.md_5.bungee.protocol.Protocol$DirectionData@6086737e
at net.md_5.bungee.protocol.MinecraftDecoder.decode(MinecraftDecoder.java:37)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:247)
... 17 more

@kxjhwbb
Copy link
Author

kxjhwbb commented Oct 29, 2015

and this

16:56:46 [WARNING] [/1.32.92.234:10067] <-> InitialHandler - encountered exception
io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(1) + length(1) exceeds writerIndex(1): PooledUnsafeDirectByteBuf(ridx: 1, widx: 1, cap: 1)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:278)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:147)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:161)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
at io.netty.handler.codec.ByteToMessageDecoder.handlerRemoved(ByteToMessageDecoder.java:108)
at io.netty.channel.DefaultChannelPipeline.callHandlerRemoved0(DefaultChannelPipeline.java:526)
at io.netty.channel.DefaultChannelPipeline.callHandlerRemoved(DefaultChannelPipeline.java:520)
at io.netty.channel.DefaultChannelPipeline.remove0(DefaultChannelPipeline.java:350)
at io.netty.channel.DefaultChannelPipeline.remove(DefaultChannelPipeline.java:321)
at io.netty.channel.DefaultChannelPipeline.remove(DefaultChannelPipeline.java:298)
at net.md_5.bungee.protocol.LegacyDecoder.decode(LegacyDecoder.java:37)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:247)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:147)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:150)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IndexOutOfBoundsException: readerIndex(1) + length(1) exceeds writerIndex(1): PooledUnsafeDirectByteBuf(ridx: 1, widx: 1, cap: 1)
at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1175)
at io.netty.buffer.AbstractByteBuf.readByte(AbstractByteBuf.java:570)
at net.md_5.bungee.protocol.DefinedPacket.readVarInt(DefinedPacket.java:111)
at net.md_5.bungee.protocol.DefinedPacket.readVarInt(DefinedPacket.java:101)
at net.md_5.bungee.protocol.packet.Handshake.read(Handshake.java:26)
at net.md_5.bungee.protocol.DefinedPacket.read(DefinedPacket.java:196)
at net.md_5.bungee.protocol.MinecraftDecoder.decode(MinecraftDecoder.java:34)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:247)
... 28 more

@Janmm14
Copy link
Contributor

Janmm14 commented Oct 29, 2015

Its no hack, its likely invalid data sent by clients. If you can reproduce this with a 100% sure vanilla client, please say so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants