RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1476153 - [RFE] libsmbclient should not terminate a connection in case it receives an SMB2 ECHO Response with an error
Summary: [RFE] libsmbclient should not terminate a connection in case it receives an S...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: samba
Version: 7.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Andreas Schneider
QA Contact: Andrej Dzilský
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-28 07:24 UTC by Thorsten Scherf
Modified: 2020-12-14 09:16 UTC (History)
7 users (show)

Fixed In Version: samba-4.7.1-6.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 17:28:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0937 0 None None None 2018-04-10 17:29:42 UTC
Samba Project 13007 0 None None None 2019-07-01 13:53:36 UTC

Description Thorsten Scherf 2017-07-28 07:24:51 UTC
Description of problem:

According to the specs, a SMB server should answer an SMB2 ECHO Request with STATUS_SUCCESS to demonstrate it's responsive and can process requests. In some cases SMB servers might not be able to handle ECHO Requests with a Session ID 0 (which is completely valid according to the specs) and return an ERROR instead. As a result, smblclient currently terminates the network connection:

017-07-17 14:00:40.873514 192.168.220.211 → 149.78.138.25 SMB2 138 KeepAlive Request
2017-07-17 14:00:40.873637 149.78.138.25 → 192.168.220.211 SMB2 143 KeepAlive Response, Error: STATUS_USER_SESSION_DELETED
2017-07-17 14:00:40.873676 192.168.220.211 → 149.78.138.25 TCP 66 51296 → 445 [FIN, ACK] Seq=1632 Ack=1395 Win=35712 Len=0 TSval=2284796732 TSecr=2066    075117

We reached out to Microsoft to get some clarification what exactly the client is supposed to do in such a case. Here is the answer:

"""
Client behavior in regards to ECHO is implementation-specific (there is no mention in section 3.2). ECHO is merely a keep-alive ping to see if the server is responsive, so any response could be considered success. All the Server does (besides disconnecting the connection if Connection.SessionTable is empty) is validate the structure of the request. If the server returns STATUS_INVALID_PARAMETER, this indicates the Client formed the request incorrectly, but shows the Server is responsive (as does any response, error or success).
"""

This RfE is about a change in current libsmbclient behavior. The client *should not* terminate the network connection in case an error is returned from the server and should continue processing SMB commands instead.
 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 7 Andrej Dzilský 2018-02-05 09:31:40 UTC
Behavior of smbclient looks as described.

Comment 11 errata-xmlrpc 2018-04-10 17:28:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0937


Note You need to log in before you can comment on or make changes to this bug.