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

NullPointerException seen in the field for jcifs.util.transport.Response.isReceived() #321

Open
courville opened this issue Nov 12, 2022 · 3 comments

Comments

@courville
Copy link

Seen in the field with nova my android video player app reported on my sentry crashnalytics backend (no clue what triggers it). Here is the stacktrace collected:

java.lang.NullPointerException: Attempt to invoke interface method 'boolean jcifs.util.transport.Response.isReceived()' on a null object reference
    at jcifs.smb.SmbTransportImpl.sendrecv(SmbTransportImpl.java:1053)
    at jcifs.smb.SmbTransportImpl.send(SmbTransportImpl.java:1549)
    at jcifs.smb.SmbTransportImpl.send(SmbTransportImpl.java:1513)
    at jcifs.smb.SmbSessionImpl.sessionSetupSMB1(SmbSessionImpl.java:907)
    at jcifs.smb.SmbSessionImpl.sessionSetup(SmbSessionImpl.java:494)
    at jcifs.smb.SmbSessionImpl.send(SmbSessionImpl.java:369)
    at jcifs.smb.SmbSessionImpl.send(SmbSessionImpl.java:347)
    at jcifs.smb.SmbTreeImpl.treeConnect(SmbTreeImpl.java:611)
    at jcifs.smb.SmbTreeConnection.connectTree(SmbTreeConnection.java:614)
    at jcifs.smb.SmbTreeConnection.connectHost(SmbTreeConnection.java:568)
    at jcifs.smb.SmbTreeConnection.connectHost(SmbTreeConnection.java:489)
    at jcifs.smb.SmbTreeConnection.connect(SmbTreeConnection.java:465)
    at jcifs.smb.SmbTreeConnection.connectWrapException(SmbTreeConnection.java:426)
    at jcifs.smb.SmbFile.ensureTreeConnected(SmbFile.java:559)
    at jcifs.smb.SmbEnumerationUtil.doEnum(SmbEnumerationUtil.java:221)
    at jcifs.smb.SmbEnumerationUtil.listFiles(SmbEnumerationUtil.java:279)
    at jcifs.smb.SmbFile.listFiles(SmbFile.java:1287)
    at com.archos.filecorelibrary.jcifs.JcifListingEngine$JcifListingThread.run(JcifListingEngine.java:113)

jcifs master is used.

@mbechler
Copy link
Contributor

Analysis revealed one situtation in which that exception can occur, but I'm not sure that could have been reached in your case, and therefore whether this is the proper fix.

@courville
Copy link
Author

Thanks, I will deploy the current master in the field and monitor if the issue is reproduced.

@mbechler
Copy link
Contributor

Going after that NPE I also came across a logic error that prevented SMB1's AndX chaining from being used which was supposed to be enabled by default. Currently that is enabled in master, but I'm not sure we should by default at this point. If you see any other SMB1 related errors that would be very helpful information as well.

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

2 participants