WaterfallMC / Waterfall-Old

[UNMAINTAINED] Waterfall prior to becoming patch-based, see the project website at
https://papermc.io
Other
35 stars 12 forks source link

IndexOutOfBoundsException #50

Open mibby opened 8 years ago

mibby commented 8 years ago

WaterFall dev 186

This error happened when a player connected.

22:11:32 [SEVERE] [/IP:PORT] <-> InitialHandler - encountered exception
io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(3) + length(75) exceeds writerIndex(8): SlicedAbstractByteBuf(ridx: 3, widx: 8, cap: 8/8, unwrapped: PooledUnsafeDirectByteBuf(ridx: 9, widx: 9, cap: 9))
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:99)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.github.waterfallmc.waterfall.DirectByteToMessageDecoder.fireChannelRead(DirectByteToMessageDecoder.java:179)
    at io.github.waterfallmc.waterfall.DirectByteToMessageDecoder.channelRead(DirectByteToMessageDecoder.java:169)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.github.waterfallmc.waterfall.DirectByteToMessageDecoder.handlerRemoved(DirectByteToMessageDecoder.java:126)
    at io.netty.channel.DefaultChannelPipeline.callHandlerRemoved0(DefaultChannelPipeline.java:527)
    at io.netty.channel.DefaultChannelPipeline.callHandlerRemoved(DefaultChannelPipeline.java:521)
    at io.netty.channel.DefaultChannelPipeline.remove0(DefaultChannelPipeline.java:351)
    at io.netty.channel.DefaultChannelPipeline.remove(DefaultChannelPipeline.java:322)
    at io.netty.channel.DefaultChannelPipeline.remove(DefaultChannelPipeline.java:299)
    at net.md_5.bungee.protocol.LegacyDecoder.decode(LegacyDecoder.java:70)
    at io.github.waterfallmc.waterfall.DirectByteToMessageDecoder.callDecode(DirectByteToMessageDecoder.java:281)
    at io.github.waterfallmc.waterfall.DirectByteToMessageDecoder.channelRead(DirectByteToMessageDecoder.java:150)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:152)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
    at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:823)
    at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:339)
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:255)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IndexOutOfBoundsException: readerIndex(3) + length(75) exceeds writerIndex(8): SlicedAbstractByteBuf(ridx: 3, widx: 8, cap: 8/8, unwrapped: PooledUnsafeDirectByteBuf(ridx: 9, widx: 9, cap: 9))
    at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1178)
    at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1172)
    at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:693)
    at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:701)
    at net.md_5.bungee.protocol.DefinedPacket.readString(DefinedPacket.java:30)
    at net.md_5.bungee.protocol.packet.Handshake.read(Handshake.java:27)
    at net.md_5.bungee.protocol.DefinedPacket.read(DefinedPacket.java:204)
    at net.md_5.bungee.protocol.MinecraftDecoder.decode(MinecraftDecoder.java:37)
    at net.md_5.bungee.protocol.MinecraftDecoder.decode(MinecraftDecoder.java:10)
    at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89)
    ... 26 more
Janmm14 commented 8 years ago

Once or every time? Is it a bot attack? Client version? With which server ip did the client connect (numeric, domain name)?

Techcable commented 8 years ago

Looks like someone is trying to do the array attack against you.

mibby commented 8 years ago

The error seems to occur the first time someone connects after Waterfall starts up. The IP in this instance leads to a longstanding supporter in the community, so it can't be someone attacking the server. I removed his IP to keep his privacy. Client version should be 1.9.2.

Techcable commented 8 years ago

just bug me if this doesn't fix the issue.

Techcable commented 8 years ago

Yeah, nvm I'm crazy :D

Janmm14 commented 8 years ago

Are you able to reproduce this error? Which address was put into the client (at least length of the address)? Is it a ping or a join try?