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

Rare NegativeArraySizeException #167

Open
bubbleguuum opened this issue Jan 28, 2022 · 0 comments
Open

Rare NegativeArraySizeException #167

bubbleguuum opened this issue Jan 28, 2022 · 0 comments

Comments

@bubbleguuum
Copy link

bubbleguuum commented Jan 28, 2022

Using v0.12.0, I've an automated rare crash report from a user of my app:

 java.lang.NegativeArraySizeException: -88
                at com.rapid7.client.dcerpc.transport.RPCTransport.call(RPCTransport.java:81)
                at com.rapid7.client.dcerpc.service.Service.call(Service.java:46)
                at com.rapid7.client.dcerpc.service.Service.callExpect(Service.java:55)
                at com.rapid7.client.dcerpc.mssrvs.ServerService.access$600(ServerService.java:58)
                at com.rapid7.client.dcerpc.mssrvs.ServerService$GetSharesRequest.call(ServerService.java:296)
                at com.rapid7.client.dcerpc.mssrvs.ServerService.getShares1(ServerService.java:122)

Looking at RPCTransport.java:81, we have final byte[] packetInBytes = new byte[getMaxXmitFrag()];.
So getMaxXmitFrag() is returning -88. Probably a bug in whatever is providing this value, that is not checked that it is valid by the lib (> 0).

All I know is that the queried device is some sort of router with SMB and that at the time of the crash there's a session connected to it with these characteristics:
NegotiatedProtocol{dialect=SMB_3_0, maxTransactSize=65696, maxReadSize=65564, maxWriteSize=65584}

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

1 participant