Bug 196599 - [4.13] CIFS mount error -112, non-descriptive error for wrong SMB protocol version.
Summary: [4.13] CIFS mount error -112, non-descriptive error for wrong SMB protocol ve...
Status: RESOLVED CODE_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: CIFS (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: fs_cifs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-06 10:02 UTC by beanow
Modified: 2019-02-07 10:03 UTC (History)
5 users (show)

See Also:
Kernel Version: 4.13.0-rc3
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description beanow 2017-08-06 10:02:30 UTC
A setup which has worked fine on older kernels (4.10 and 4.12) seems to have a regression.

An fstab line like:
//192.168.1.123/path/ /mnt/path cifs rw,iocharset=utf8,cache=loose,username=alice,password=bob 0 0

Now claims
mount: mount //192.168.1.123/path/ on /mnt/path failed: Host is down

Using nautilus to mount this share with gvfs works just fine.
Comment 1 beanow 2017-08-06 10:09:47 UTC
Just tested on rc3 as well from http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13-rc3/

And dmesg reports:

[   18.017092] FS-Cache: Loaded
[   18.025976] FS-Cache: Netfs 'cifs' registered for caching
[   18.026025] Key type cifs.spnego registered
[   18.026026] Key type cifs.idmap registered
[   18.029621] CIFS VFS: cifs_mount failed w/return code = -112
Comment 2 The Linux kernel's regression tracker (Thorsten Leemhuis) 2017-08-06 13:51:52 UTC
TWIMC: This issue is tracked in the regression reports for Linux 4.13
(http://bit.ly/lnxregrep413 ) with this id:

Linux-Regression-ID: lr#60efe5

Please include this line in the comment section of patches that are
supposed to fix the issue. Please also mention the string once in other
mailinglist threads or different bug tracking entries if you or someone
else start to discuss the issue there. By including that string you make
it a whole lot easier to track where an issue gets discussed and how far
patches to fix it have made it. For more details on this please see
here: http://bit.ly/lnxregtrackid Thx for your help. 

Side note: many Linux subsystems ignore bugzilla, thus if nothing happens here in the next two or three days please report the issue in a mail to linux-cifs@vger.kernel.org
Comment 3 Woody Suwalski 2017-08-06 15:14:43 UTC
This behavior is caused by switching the default CIFS dialect from SMB1.0 to SMB3.0. The mount command will work OK, if you add to the command line "vers=1.0" option. See the "smb3-security-fixes-for-4.13" merge from Steve French on July 11.
Comment 4 Woody Suwalski 2017-08-06 15:40:27 UTC
Repeating with Thorsten's tracking ID:

Linux-Regression-ID: lr#60efe5

This behavior is caused by switching the default CIFS dialect from SMB1.0 to SMB3.0. The mount command will work OK, if you add to the command line "vers=1.0" option. See the "smb3-security-fixes-for-4.13" merge from Steve French on July 11.
Comment 5 The Linux kernel's regression tracker (Thorsten Leemhuis) 2017-08-07 11:45:30 UTC
(In reply to Woody Suwalski from comment #4)
> Repeating with Thorsten's tracking ID:

Thx, not needed ("Please also mention the string once in other
mailinglist threads or *different bug tracking entries* [...]"; should I adjust the text to make the *different entries* more clear to differentiate )
 
> This behavior is caused by switching the default CIFS dialect from SMB1.0 to
> SMB3.0. The mount command will work OK, if you add to the command line
> "vers=1.0" option. See the "smb3-security-fixes-for-4.13" merge from Steve
> French on July 11.

FWIW: that's https://git.kernel.org/torvalds/c/908b852df1d5d27d289e915fea7bfc16d38b8a76 / https://git.kernel.org/torvalds/c/eef914a9eb5eb83e60eb498315a491cd1edc13a1 I already feared it might be the reason why. But why doesn't the kernel at least put out a warning like """ CIFS is using SMB3 by default now for security reasons, but the server you are trying to reach only supports SMB1.0; if you want to use this older and insecure dialect use the mount option "vers=1.0". """ (well something along those lines).
Comment 6 beanow 2017-08-07 13:38:13 UTC
My thoughts exactly. "Host is down" is completely non-descriptive of the actual issue which would be the case as well if this was not an upgrade but someone trying to set up a new configuration with an older host.

The version option indeed lets it mount again. Still thinking the poor error message is a bug, it's at least not a regression.
Comment 7 The Linux kernel's regression tracker (Thorsten Leemhuis) 2017-08-14 11:43:17 UTC
(In reply to Thorsten Leemhuis from comment #2)
>
> Side note: many Linux subsystems ignore bugzilla, thus if nothing happens
> here in the next two or three days please report the issue in a mail to
> linux-cifs@vger.kernel.org

Did anyone do that? Afaics nobody did. Hint: If nobody steps up than there is a high chance that the issue gets ignored simply because the responsible people never got aware of it :-/
Comment 8 beanow 2017-08-15 09:39:17 UTC
(In reply to Thorsten Leemhuis from comment #7)
> Did anyone do that? Afaics nobody did. Hint: If nobody steps up than there
> is a high chance that the issue gets ignored simply because the responsible
> people never got aware of it :-/

Isn't this a very Linux moment? For every good solution there will be half a dozen groups using something else.

Anyway, I attempted posting in the list. But I get no subscribe confirmation and no messages showing in the *only* working archive I could find. I fear the mailing list server has a grudge against mine and throws it in the SPAM bin.

I did find the patch author for the upgrade to SMB3, I'll try messaging them directly.
http://www.spinics.net/lists/linux-cifs/msg12836.html
Comment 9 beanow 2017-08-15 09:45:58 UTC
Never mind that, smfrench@gmail.com already receives emails for this bug according to the bugzilla notification up to.
Comment 10 Michal Suchánek 2017-10-15 21:05:26 UTC
I get the warning after upgrading my kernel.

Supposedly the protocol requested by the kernel is SMB3 - why? There are no known issues in SMB2. 

My samba server to which I cannot connect reports that the server max protocol is set to default value - SMB3.

WTF?
Comment 11 Michal Suchánek 2017-10-15 21:06:31 UTC
[78165.485043] No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
[78165.567002] CIFS VFS: protocol revalidation - security settings mismatch
[78165.578589] CIFS VFS: session ffff96dc072fe400 has no tcon available for a dfs referral request
[78165.588988] CIFS VFS: cifs_mount failed w/return code = -5
Comment 12 Michal Suchánek 2017-10-16 01:59:12 UTC
And upgrading the server from Debian oldstable to stable resolves the problem. Still the oldstable samba claims support for SMB3 so the message is misleading again.
Comment 13 Ronnie Sahlberg 2019-02-07 04:27:43 UTC
The error message was updated a while back so this can be closed.

Note You need to log in before you can comment on or make changes to this bug.