Bug 13218 - SMB2 keepalive/echo terminates connection
SMB2 keepalive/echo terminates connection
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: libsmbclient
4.7.0
All Linux
: P5 normal
: ---
Assigned To: Samba QA Contact
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-13 15:51 UTC by Jan
Modified: 2018-01-13 16:12 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan 2018-01-13 15:51:43 UTC
I think I am experiencing a bug in the implementation of SMB2 keepalives. As 
libsmbclient does not set the session for the echo request, the server used in 
my environment responds with STATUS_USER_SESSION_DELETED, which is the 
expected behavior (see [1,2]). As the server response indicates an 
error, the client disconnects. Ultimately, this leads to a new 
connection for every operation, which introduces painful delays.

I first experienced this behavior using libsmbclient 4.7.0 on a Fedora Linux 27. It looks like older versions would behave the same, but 4.7 was the first using SMB2 in my setup.

Unfortunately, I am not able to share PCAPs publicly.

Best regards,
Jan

[1] https://msdn.microsoft.com/en-us/library/cc246324.aspx
[2] https://msdn.microsoft.com/en-us/library/cc246482.aspx