-
Notifications
You must be signed in to change notification settings - Fork 183
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
When trying to download files, getting Signatures for packet SMB2_CREATE with message id <<#### >> do not match #420
Comments
Hi @nddipiazza, I've just added an extra log line to the master. This will print the SMB2Header when the signatures do not match. That might give some extra clue as to what's going wrong. |
@hierynomus here you go
|
@nddipiazza Thanks! The Status code of the SMB2_CREATE packet is STATUS_NOT_A_DIRECTORY. Which action are you performing? |
Here is the problematic file...
Interesting! I'll try excluding that file and see where that takes us. |
skipped
|
OK now i know what's going on. On this share (not others), these are the calls that are crashing In my code, I'm taking a plain smb URL So it will go in order..
If we send a path that is a folder into
And if we send a path that is a file into
We have 2 windows share servers that inexplicably cause this error. Not others. Any ideas how to fix this? |
@hierynomus any idea why this would cause packet signing problems? There doesn't seem to be anything special about the message exchange itself, so that's kind of surprising. Seems like there's some problem in handling error messages in combination with signing. |
if we change this so that the error doesn't close connection to the share, that would unblock me. meaning if it would detect this issue, then return a graceful exception back to the DiskShare client instead of killing the entire samba connection. |
hi @nddipiazza, May I ask something stupid: What's the dialect you are using? Because I see you are saying the env is using SMB3. I want to make sure we understand your issue correctly.
Did the negotiation really go for SMB3.x family? The signing method is different. From the [MS-SMB2] document 3.1.4.1 Signing An Outgoing Message,
|
I was told smb3 by the administrators but I never tried to prove it. Looks like from https://serverfault.com/questions/770345/how-do-you-check-what-version-of-server-message-block-client-a-workstation-is-us I can check this myself. i will do this and let you know. |
Hi @nddipiazza, Actually this library is not supported SMB3 yet. But you are saying you are using it, so, I am just making sure you are not actually using it (i.e. you haven't change it) and I didn't go wrong direction on the very beginning. |
@yin19941005 SMB2 and 3 are the same protocol, just a slightly different dialect where SMB3 for instance allows encryption. If the server supports SMB3, most probably SMB2 (non-encrypted) is still also enabled, else it would've stopped at the protocol negotiation already. @pepijnve Yes, I think there is a problem in the SMB2Error handling. We're probably missing the read of a few padding bits, which makes that the signature calculation is off. @nddipiazza Can you get us a packet capture using wireshark? I'd like to analyze the full bytes of the erroneous message. |
I very likely cannot get wireshark installed on the server. I will try. |
Just the client, grab it from there.
Op vr 21 dec. 2018 om 14:14 schreef Nicholas DiPiazza <
notifications@github.com>:
… Get-SmbConnection reports version 3.0.2 of SMB.
I very likely cannot get wireshark installed on the server. I will try.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#420 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHLo5U1UxVOkKT8qtcsBZb0VbjVrhlUks5u7N62gaJpZM4ZYkvV>
.
|
Right. I have asked them hopefully they can get this for me. I cant install wireshark anywhere. |
Experienced this error again with another client. we will try to get you wireshark from them. |
Having the same issue here. Wireshark is difficult as we have the same error randomly occurring calling the same file over and over again. Max dialect on the server is 3.0.2. Code to establish the connection: this.client = new SMBClient(config); |
@hierynomus i have sent your email a scrubbed tcpdump capture of the issue. please let me know if it helps. |
Hi @hierynomus did you have a chance to see this? Thanks! |
I've had a look, but am curious which SMB2 CREATE was mismatched? There are a few 100 in there ;) |
If you've got a log which corresponds to the PCAP, I can correlate the message and see what's wrong. |
I sent that. I'm trying to also get you a version of these logs with less going on to help isolate too. |
@nddipiazza Can you try to build the code in #458 and see whether that solves the problem? |
@hierynomus I hope to find time to test this as well next week. I can't promise yet... |
@hierynomus this seems successful now. |
Merged #458 |
Env info:
I am getting some
Signatures for packet SMB2_CREATE with message id <<#### >> do not match
errors when I am trying to access a specific windows share files. Some of the windows shares in my network work fine. Many however return these sorts of errors.I have asked my admin team to try to figure out what might be special about these particular shares that are different than the ones that are working??
The strangest thing is that I can list the files and folders fine. That part works.
But when I try to access the file contents from the
getInputStream
, that is when these errors occur.Error examples from my logs:
Due to security I can't get much from the environment, but I can perhaps try. What kind of things can help us diagnose this?
The text was updated successfully, but these errors were encountered: