CIFS-mount fails with kernel 5.18.9-1-default

Yesterday I updated my openSUSE Tumbleweed system (using zypper dup):

Operating System: openSUSE Tumbleweed 20220706
KDE Plasma Version: 5.25.2
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5
Kernel Version: 5.18.9-1-default (64-bit)
cifs-utils 6.15-1.2
samba 4.16.2+git.262.6acc6531bc7-1.1

Since then I cannot mount my NAS shares any longer.

mount -t cifs -o rw,user=USERNAME //NAS_IP/share /mnt

fails and the journal shows

CIFS: VFS: cifs_mount failed w/return code = -22

Mounting the same share via dolphin (smb://NAS_IP/share) works fine.

smbclient -U USERNAME -L NAS_IP

shows the share.

When I reboot and use kernel 5.18.6-1-default everything works as expected.

As I could not find a bug in bugzilla so I wonder if anyone else has run into the same problem.

Regards

susejunky

Yep, same happens on my system after I updated to the snapshot with kernel 5.18.9 today. Mounting using the file manager using smb:// works fine. Just the auto-mounting through fstab no longer works.

Discussed upstream here:
https://lore.kernel.org/linux-cifs/20220630203207.ewmdgnzzjauofgru@cyberdelia/T/#t

Thank you for that link.

Due to my limited English language skills and my limited technical knowledge I’m not quite sure that I can follow the discussion in that link.

As far as I understand the first posts identify two kernel patches as the culprit. But then the discussion suddenly moves to SAMBA server.

So is this a kernel or a SAMBA server problem?

Regards

susejunky

A kernel issue. Another similar thread…

https://bbs.archlinux.org/viewtopic.php?id=277722

Something to try: Does specifying “vers=2.0” or “vers=3.02” in the mount command work for you?

This mount works fine here:

**erlangen:~ #** grep cifs /etc/fstab  
//fritz.box/FRITZ.NAS                      /fritz.box              **cifs**   noauto,username=ftpuser,vers=1.0  0  0 
**erlangen:~ #**
**erlangen:~ #** journalctl -b -g cifs 
Jul 10 07:29:06 erlangen kernel: **Key type ****cifs****.spnego registered** 
Jul 10 07:29:06 erlangen kernel: **Key type ****cifs****.idmap registered** 
Jul 10 07:29:06 erlangen kernel: **CIFS****: VFS: Use of the less secure dialect vers=1.0 is not recommended unless required for access to very old servers** 
Jul 10 07:29:06 erlangen kernel: CIFS: Attempting to mount \\fritz.box\FRITZ.NAS 
**erlangen:~ #** 
**erlangen:~ #** zypper if kernel-default               
Loading repository data... 
Reading installed packages... 


Information for package kernel-default: 
--------------------------------------- 
Repository     : Haupt-Repository (OSS) 
Name           : kernel-default 
Version        : 5.18.9-1.1 
Arch           : x86_64 
Vendor         : openSUSE 
Installed Size : 276.1 MiB 
Installed      : Yes 
Status         : up-to-date 
Source package : kernel-default-5.18.9-1.1.nosrc 
Upstream URL   : https://www.kernel.org/ 
Summary        : The Standard Kernel 
Description    :  
    The standard kernel for both uniprocessor and multiprocessor systems. 


    Source Timestamp: 2022-07-03 08:04:03 +0000 
    GIT Revision: 0e67dc1e33ee02c2edff307e49d59bd4c73ce79f 
    GIT Branch: stable 

**erlangen:~ #**

You’re using the deprecated SMBv1 protocol. That may be why you are not impacted here.

@karlmistelberger

I have also an fritzbox, you can use noserverino to use higher samba protocolls:

//192.168.0.254/fritz.nas /mnt/fritznas cifs vers=3.1.1,noserverino,username=xxxxx,password=yyyyyy,uid=1000,gid=100 0 0

This works with Leap but may fail temporarely at Tumbleweed because of the bug.

The FRITZ!Box 7360 supports only vers=1.0, but I tried anyway:

[FONT=monospace]**erlangen:~ #** mount /fritz.box/ 
Password for ftpuser@//fritz.box/FRITZ.NAS:  
mount error: Server abruptly closed the connection. 
This can happen if the server does not support the SMB version you are trying to use. 
The default SMB version recently changed from SMB1 to SMB2.1 and above. Try mounting with vers=1.0. 
mount error(112): Host is down 
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg) 
**erlangen:~ #**[/FONT]

The FRITZ!Box 7360 supports only vers=1.0

Yes, seen on the homepage…

Yes!

mount -t cifs -o rw,user=USERNAME,vers=2.0 //NAS_IP/share /mnt

Works as expected.

Thank you very much!

Regards

susejunky

It’s what was reported to work in the archlinux thread I linked to discussing the same regression. Good to know that it worked for you. :slight_smile: