Opened 4 years ago

Closed 3 years ago

#1733 closed defect (worksforme)

Error in the ntcp reader: AIOOBE

Reported by: dg Owned by: zzz
Priority: minor Milestone: n/a
Component: router/transport Version: 0.9.23
Keywords: Cc:
Parent Tickets: Sensitive: no

Description (last modified by dg)

I2P version: 0.9.23-0
Java version: Oracle Corporation 1.8.0_66-internal (OpenJDK Runtime Environment 1.8.0_66-internal-b01)
Wrapper version: 3.5.25
Server version: 8.1.17.v20150415
Servlet version: Jasper JSP 2.1 Engine
Platform: Linux amd64 2.6.32-042stab108.8
Processor: Haswell (22nm) (corei)
Jbigi: Locally optimized library libjbigi-linux-corei_64.so loaded from file
Encoding: UTF-8
Charset: UTF-8
CRIT [P reader 2/4] p.router.transport.ntcp.Reader: Error in the ntcp reader
    java.lang.ArrayIndexOutOfBoundsException
    at net.i2p.router.transport.ntcp.NTCPConnection.recvEncryptedFast(NTCPConnection.java:1266)
    at net.i2p.router.transport.ntcp.NTCPConnection.recvEncryptedI2NP(NTCPConnection.java:1187)
    at net.i2p.router.transport.ntcp.Reader.processRead(Reader.java:180)
    at net.i2p.router.transport.ntcp.Reader.access$400(Reader.java:21)
    at net.i2p.router.transport.ntcp.Reader$Runner.run(Reader.java:120)
    at java.lang.Thread.run(Thread.java:745)
    at net.i2p.util.I2PThread.run(I2PThread.java:100)

Busy router, no other similar errors.

Subtickets

Change History (4)

comment:1 Changed 4 years ago by dg

Description: modified (diff)

comment:2 Changed 4 years ago by zzz

Milestone: undecided0.9.24

Never seen before, not apparent why

comment:3 Changed 4 years ago by str4d

Status: newopen

comment:4 Changed 3 years ago by zzz

Milestone: 0.9.24n/a
Resolution: worksforme
Status: openclosed

Seems impossible.

                int start = pos - BLOCK_SIZE;
                for (int i = 0; i < BLOCK_SIZE; i++) {
                    _decryptBlockBuf[i] ^= array[start + i];
                }

_decryptBlockBuf is BLOCK_SIZE bytes so it can't be that.
perhaps array isn't mod 16 == 0, but in recvEncryptedI2NP() above, this method isn't called unless array is at least 32 available and mod 16 == 0.

Closing as unreproducible. If this is some locking/synchronization bug, I can't figure it out. Please reopen if seen again.

Note: See TracTickets for help on using tickets.