-
Notifications
You must be signed in to change notification settings - Fork 104
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
"SmbException: The parameter is incorrect" faced on all WD MyCloud recent products #226
Comments
Is this specifically linked to the most recent patches? |
I cannot tell since the previous alpha release was not deployed with enough large user base. |
Two options that come to mind and may be worth a try to figure out the cause:
I would suspect that these are using samba servers, maybe one of your users can check the version, then I could test a matching version. |
In the open-source release of WD https://support-en.wd.com/app/products/product-detail/p/1369#WD_downloads, unpacking the release I see a samba-4.4.0 (GPL_MCH_6.6.1-123_20191114/ANDK/samba/samba-4.4.0). Not sure it matches current firmware version but recent enough OSS release (11/19/2019). I have not tried to seek for the config though. |
FYI I found the following smb.conf at root of the open-source release
|
I think I managed to reproduce the issue by testing some older samba versions. There seems to be a whole range of samba versions it tries to validate SPENGO and NTLM message intregrity (MICs) when a guest login is performed and then fails with INVALID_PARAMETER (this cannot work, as there is no valid session key): https://bugzilla.samba.org/show_bug.cgi?id=11847 While this clearly is a samba bug, there are a number of things we can do to avoid it and this probably deserves a mitigation, as it may be a somewhat common issue. I'll have to think about this a bit more. In the meantime, setting jcifs.smb.client.disableSpnegoIntegrity=true should avoid the issue as well.
|
Thanks for following it through! |
I have the feeling that I actually meant to suggest jcifs.smb.client.disableSpnegoIntegrity=true in #186. Maybe this was fixed by some other change. |
Ok thanks for the tip: I will check and report. |
…with WD MyCloud see AgNO3/jcifs-ng#226
… solving WD MyCloud issues See AgNO3/jcifs-ng#186 and AgNO3/jcifs-ng#226 Separate SMBv1 and SMBv2 world and do not mix options
Users have tested an experimental build of my application and report that jcifs.smb.client.disableSpnegoIntegrity=true fixes the "parameter is incorrect" issue when SMB2 is enabled but not when using SMB1 only.
|
… solving WD MyCloud issues See AgNO3/jcifs-ng#186 and AgNO3/jcifs-ng#226 Separate SMBv1 and SMBv2 world and do not mix options
… solving WD MyCloud issues See AgNO3/jcifs-ng#186 and AgNO3/jcifs-ng#226 Separate SMBv1 and SMBv2 world and do not mix options
… solving WD MyCloud issues See AgNO3/jcifs-ng#186 and AgNO3/jcifs-ng#226 Separate SMBv1 and SMBv2 world and do not mix options
For SMB1 you could also try jcifs.smb.useRawNTLM=true |
Disables sending of a SPNEGO MIC when guest authentication is requested. (This cannot be verified anyways as there are no share credentials). A range of samba versions has a bug that causes a "Invalid parameter" error when a MIC is present and no key is available (invalid credentials). Also maps the invalid parameter error to a SmbAuthException to permit proper handling and possibly fallback.
I've added a workaround that should make guest login work without any special configuration. This disables the SPNEGO MIC when guest login is requested (use withGuestCredentials() or the appropriate NtlmPasswordAuthenticator constructors) Login with invalid credentials will still fail with the error, but this is now converted into an SmbAuthException. However, in my tests jcifs.smb.client.disableSpnegoIntegrity=true generally solves the issue (however, there are modern servers which require the MIC), so there may be an additional issue if this does not work for SMB1 in your case. |
… solving WD MyCloud issues See AgNO3/jcifs-ng#186 and AgNO3/jcifs-ng#226 Separate SMBv1 and SMBv2 world and do not mix options
Thanks: I will deploy a new beta and share with WD MyCloud users for collecting feedback. |
… solving WD MyCloud issues See AgNO3/jcifs-ng#186 and AgNO3/jcifs-ng#226 Separate SMBv1 and SMBv2 world and do not mix options
… solving WD MyCloud issues See AgNO3/jcifs-ng#186 and AgNO3/jcifs-ng#226 Separate SMBv1 and SMBv2 world and do not mix options
… solving WD MyCloud issues See AgNO3/jcifs-ng#186 and AgNO3/jcifs-ng#226 Separate SMBv1 and SMBv2 world and do not mix options
… solving WD MyCloud issues See AgNO3/jcifs-ng#186 and AgNO3/jcifs-ng#226 Separate SMBv1 and SMBv2 world and do not mix options
For the record it seems that with Western Digital NAS |
An update from feedback (without logs and captures) of WD users in the field: with |
Some updates on the investigation:
|
Let's declare this issue closed. Seems that it works now with jcifs-ng master. Will reopen if need be. Thank you a lot for the continuous dedicated support. |
Trying to use latest jcifs-ng (59c3c0a) in my open-source android nova video player migrating from old jcifs-1.3.19 and got an unanimous feedback about problems with WD MyCloud NAS products resulting in a rollback.
Trying to get more logs and details through remote users is not the easiest. What I got is the following png
adb logcat
that showsSmbException: The parameter is incorrect
.Without any access to the device I will not be able to get more logs or wireshark captures.
Note that SMB2 is disabled by default in the app and can be activated via settings and thus with following config:
I am not sure it will help but, I guess it is worth opening an issue to track the problem.
I might acquire a such a device if you have no hint on the problem.
The text was updated successfully, but these errors were encountered: