Bug 1507342

Summary: CIFS Secure Dialect Negotiation fails for Dialect>=v3
Product: [Fedora] Fedora Reporter: redhatbugzilla
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 26CC: airlied, ajax, bskeggs, ewk, hdegoede, ichavero, itamar, jarodwilson, jcline, jeremy, jglisse, john.j5live, jonathan, josef, kernel-maint, linville, mchehab, mjg59, steved
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-30 13:43:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description redhatbugzilla 2017-10-29 23:56:03 UTC
Using 4.13.9-200.fc26.x86_64, trying to mount a Windows 10 share (which does support up to SMB dialect 3.02).
Also fails using any 4.13 kernel on fc25 and presumably fc27

Use the default dialect (which is 3.02 for this server):
umount /mnt;mount -t cifs -o username=$user,password=$password //win0/c /mnt
umount: /mnt: not mounted.
mount error(5): Input/output error

Inspecting a tcpdump shows that this server supports 2.1, 3.0 and 3.02.
TCPDUMP:http://www.edcint.co.nz/tmp/smb.failsdefault.pcap

Forcing 2.1 works:
umount /mnt;mount -t cifs -o username=$user,password=$password,vers=2.1 //win0/c /mnt
TCPDUMP:http://www.edcint.co.nz/tmp/smb.worksforce2.1.pcap

Forcing 3.0 fails:
umount /mnt;mount -t cifs -o username=$user,password=$password,vers=3.0 //win0/c /mnt;mount | grep /mnt
umount: /mnt: not mounted.
mount error(5): Input/output error
TCPDUMP:http://www.edcint.co.nz/tmp/smb.failsforce3.0.pcap

Forcing 3.02 also fails:
umount /mnt;mount -t cifs -o username=$user,password=$password,vers=3.02 //win0/c /mnt;mount | grep /mnt
umount: /mnt: not mounted.
mount error(5): Input/output error
TCPDUMP:http://www.edcint.co.nz/tmp/smb.failsforce3.02.pcap

All the failures appear to fail on a step of the the SMB protocol "FSCTL_VALIDATE_NEGOTIATE_INFO" (part of Secure Dialect Negotiation). Version 2.1 does not do that step.

Dropping back to kernel 4.12.*, all the SMB versions (dialects) work just fine.

Forcing 3.02 works when using kernel 4.12.13-300.fc26.x86_64: 
umount /mnt;mount -t cifs -o username=$user,password=$password,vers=3.02 //win0/c /mnt

Comment 1 Jeremy Cline 2017-10-30 13:43:44 UTC
Hello, thanks for the excellent bug report!

This has been reported upstream and the fix just landed in the queue for the next stable release this morning.

*** This bug has been marked as a duplicate of bug 1502606 ***