Bug 380302

Summary: smb:// KIO still tries SMBv1 first which is blocked by modern servers
Product: [Frameworks and Libraries] kio-extras Reporter: Waleed Hamra <kdebugs>
Component: defaultAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED NOT A BUG    
Severity: major CC: rdieter, sebas
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Waleed Hamra 2017-05-29 07:13:32 UTC
After the latest patches, many Microsoft servers now block all SMBv1 requests, without even renogitiating. This causes programs like Dolphin to show a "Timeout on server" error, because it attempted an SMBv1 connection and failed.
in smb.conf I have the min protocol specified to SMB2, but it seems the KIO slave for samba does not honour it, and still attempts an SMBv1 connection, assuming that it'll be able to negotiate if the server wants a higher protocol, which is not going to happen anymore.
This results in the inability to browse any SMB shares without having to mount them manually somewhere.
Suggestion: Either honour the min protocol configuration, or add settings to configure how KDE will handle samba. Or maybe allow us to specify version in URL somehow? (Ex= smb2://)
Comment 1 Rex Dieter 2017-05-30 16:54:19 UTC
How are you specifying protocol in smb.conf? (I ask because it's non-obvious and easy to get wrong).
Comment 2 Rex Dieter 2017-05-30 16:54:40 UTC
Or rather, do other things work as expected, like 'smbclient' ?
Comment 3 Waleed Hamra 2017-06-02 09:58:30 UTC
Sorry for the report. After lots of digging and some wiresharking, I realized the issue.
Setting max protocol to smb3 causes an smb3(2.1) connection, which our server refuse. and attempting to use smb1 will also result in the server completely ignoring the request.
Setting both min and max protocol to smb2 makes all tools happy, including Dolphin :)