Mounting SMB shares with vers=3.0 in fstab gives "ioctl error in smb2_get_dfs_refer rc=-2"

Bug #1748689 reported by helm12 on 2018-02-11
42
This bug affects 7 people
Affects Status Importance Assigned to Milestone
dellserver
Undecided
Unassigned
linux (Ubuntu)
Medium
Unassigned

Bug Description

Xubuntu 17.10 artful
Kernel: x86_64 Linux 4.13.0-32.35-generic
cifs-utils 2:6.7-1
smbclient 2:4.6.7+dfsg-1ubuntu3.1

Mounting an SMB share with
sec=ntlmssp,vers=3.0,credentials=/home/.smbcredentials,dir_mode=0777,file_mode=0777

in /etc/fstab gives the error: "CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-2" in dmesg.

Shares mounted this way are readable, but writing data to them (or using programs such as EasyTAG to write to them) ultimately fails. This bug did not occur in kernel 4.10. Mounting the share(s) with vers=1.0 does not give the error, but this is a haphazard fix as SMB v3.0 carries many security features with it not avaliable in SMB 1.0.
---
ApportVersion: 2.20.7-0ubuntu3.7
Architecture: amd64
CurrentDesktop: XFCE
DistroRelease: Ubuntu 17.10
HibernationDevice: RESUME=/dev/mapper/DeusVitam--vg-swap_1
JournalErrors:
 Error: command ['journalctl', '-b', '--priority=warning', '--lines=1000'] failed with exit code 1: Hint: You are currently not seeing messages from other users and the system.
       Users in the 'systemd-journal' group can see all messages. Pass -q to
       turn off this notice.
 No journal files were opened due to insufficient permissions.
MachineType: ASUS All Series
Package: linux (not installed)
ProcFB: 0 amdgpudrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.13.0-32-generic root=/dev/mapper/hostname--vg-root ro splash quiet amdgpu.cik_support=1 vt.handoff=7
ProcVersionSignature: Ubuntu 4.13.0-32.35-generic 4.13.13
RelatedPackageVersions:
 linux-restricted-modules-4.13.0-32-generic N/A
 linux-backports-modules-4.13.0-32-generic N/A
 linux-firmware 1.169.3
RfKill:

Tags: artful
Uname: Linux 4.13.0-32-generic x86_64
UpgradeStatus: Upgraded to artful on 2018-02-05 (7 days ago)
UserGroups: libvirt libvirtd sudo wireshark
WifiSyslog:

_MarkForUpload: True
dmi.bios.date: 03/16/2016
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0701
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: Z97-E/USB 3.1
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev X.0x
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0701:bd03/16/2016:svnASUS:pnAllSeries:pvrSystemVersion:rvnASUSTeKCOMPUTERINC.:rnZ97-E/USB3.1:rvrRevX.0x:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.family: ASUS MB
dmi.product.name: All Series
dmi.product.version: System Version
dmi.sys.vendor: ASUS

helm12 (helm12) on 2018-02-11
description: updated

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1748689

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
helm12 (helm12) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected artful
description: updated

apport information

helm12 (helm12) wrote : CRDA.txt

apport information

apport information

helm12 (helm12) wrote : IwConfig.txt

apport information

helm12 (helm12) wrote : Lspci.txt

apport information

helm12 (helm12) wrote : Lsusb.txt

apport information

apport information

apport information

apport information

apport information

apport information

apport information

helm12 (helm12) wrote : UdevDb.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Joseph Salisbury (jsalisbury) wrote :

Did this issue start happening after an update/upgrade? Was there a prior kernel version where you were not having this particular problem?

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.16 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.16-rc1/

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
helm12 (helm12) wrote :

It appears the issue is not occuring in 4.16-rc1

tags: added: kernel-fixed-upstream
Changed in linux (Ubuntu):
status: Incomplete → Confirmed

I confirm on kernels 4.15.0.19 and 4.15.0.20.

root@CmsrvLAP2:~# umount /media/Cmsrv*
root@CmsrvLAP2:~# mount -l | grep cifs
root@CmsrvLAP2:~# mount -a
root@CmsrvLAP2:~# dmesg | tail
[ 5.353312] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 5.354716] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 5.358145] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 50.748155] random: crng init done
[ 61.625333] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 61.632086] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 61.652427] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 61.661496] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 61.900523] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 61.909087] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
root@CmsrvLAP2:~# uname -a
Linux CmsrvLAP2 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
root@CmsrvLAP2:~# mount -l | grep cifs
//x.x.x.x/C$ on /media/CmsrvAPP2-C type cifs (rw,relatime,vers=3.0,cache=strict,username=xxx,domain=xxx.xx,uid=0,noforceuid,gid=0,noforcegid,addr=xxx,file_mode=0755,dir_mode=0755,soft,nounix,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)
...

Andrew Reis (drew-reis) wrote :

I can also confirm on Xenial running 4.15.0-13:
user@host:~$ dmesg | tail
[ 1331.150999] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 1331.197478] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 1331.245486] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 1631.292647] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 1631.335005] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 1631.374513] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 1931.420138] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 1931.467038] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 1931.506586] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5

user@host:~$ uname -a
Linux host 4.15.0-13-generic #14~16.04.1-Ubuntu SMP Sat Mar 17 03:04:59 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

user@host:~$ mount -l | grep cifs
//server/share1 on /var/repositories.asp/staging/share1 type cifs (rw,relatime,vers=3.02,cache=strict,username=***,domain=***,uid=59948,forceuid,gid=33,forcegid,addr=1.1.1.1,file_mode=0664,dir_mode=0775,nocase,soft,nounix,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1,_netdev)
//server/share2 on /var/repositories.asp/staging/share2 type cifs (rw,relatime,vers=3.02,cache=strict,username=***,domain=***,uid=59948,forceuid,gid=33,forcegid,addr=1.1.1.1,file_mode=0664,dir_mode=0775,nocase,soft,nounix,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1,_netdev)
//server/share3 on /var/repositories.asp/staging/share3 type cifs (rw,relatime,vers=3.02,cache=strict,username=***,domain=***,uid=59948,forceuid,gid=33,forcegid,addr=1.1.1.1,file_mode=0664,dir_mode=0775,nocase,soft,nounix,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1,_netdev)

names, usernames, domains redacted for privacy.

Andrew Reis (drew-reis) wrote :

Also confirmed on 4.15.0-22:

user@host:~$ uname -a
Linux host 4.15.0-22-generic #24~16.04.1-Ubuntu SMP Fri May 18 09:46:31 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
user@host:~$ dmesg | tail
[ 9.579718] new mount options do not match the existing superblock, will be ignored
[ 9.781330] new mount options do not match the existing superblock, will be ignored
[ 9.957734] TCP: eth0: Driver has suspect GRO implementation, TCP performance may be compromised.
[ 10.468800] FS-Cache: Loaded
[ 10.528082] FS-Cache: Netfs 'cifs' registered for caching
[ 10.528179] Key type cifs.spnego registered
[ 10.528182] Key type cifs.idmap registered
[ 10.910445] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 10.911089] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5
[ 10.911723] CIFS VFS: ioctl error in smb2_get_dfs_refer rc=-5

Andrew Reis (drew-reis) wrote :

Any update on this issue? Having it happen pretty consistently on my 16.04 machines.

Suncatcher (suncatcher) wrote :

Also confirming on 4.15.0-23. Any updates?

Sujith Pandel (sujithpandel) wrote :

I see this on 4.13.0-45-generic of Ubuntu 16.04 HWE kernels.

Andrew Reis (drew-reis) wrote :

Looks like it's potentially been fixed upstream:

https://www.spinics.net/lists/linux-cifs/msg14325.html

Can we get this patch backported to Trusty, Xenial, Artful and Bionic?

Thanks!

Michael Reed (mreed8855) wrote :

Can we test this once 18.04.2 has been released?

Andrew Reis (drew-reis) wrote :

BUMP

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers