Bug 15696 - Compound SMB2 requests don't return NT_STATUS_NETWORK_SESSION_EXPIRED for all requests, confuses MacOSX clients
Summary: Compound SMB2 requests don't return NT_STATUS_NETWORK_SESSION_EXPIRED for all...
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.21.0rc1
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL: https://gitlab.com/samba-team/samba/-...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-13 12:06 UTC by Stefan Metzmacher
Modified: 2024-10-17 12:05 UTC (History)
3 users (show)

See Also:


Attachments
Patches for v4-21-test (7.33 KB, text/plain)
2024-08-14 08:25 UTC, Stefan Metzmacher
jra: review+
Details
Patches for v4-20-test (7.33 KB, text/plain)
2024-08-14 08:25 UTC, Stefan Metzmacher
jra: review+
Details
Patches for v4-19-test (7.33 KB, text/plain)
2024-08-14 08:26 UTC, Stefan Metzmacher
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Metzmacher 2024-08-13 12:06:43 UTC
This is inspired by a customer reporting that a Mac OS client disconnects
the connection after a few hours if the server is called by dns name
and likely uses kerberos.

I found this https://apple.stackexchange.com/questions/373563/macs-disconnect-from-smb-share-status-network-session-expired-0xc000035c

It basically showed that a Mac OS Client does a compound chain of

Create(Open)
QueryDirectory
Close

The Create gets NT_STATUS_NETWORK_SESSION_EXPIRED
The QueryDirectory gets NT_STATUS_INVALID_PARAMETER
The Close gets NT_STATUS_NETWORK_NAME_DELETED

While a Windows server would return NETWORK_SESSION_EXPIRED
for all 3.

I guess it's the NETWORK_NAME_DELETED that triggers the
disconnect on the MacOS client...
Comment 1 Samba QA Contact 2024-08-13 22:30:04 UTC
This bug was referenced in samba master:

f6009aa73b9234df1e6ab689de322487ad1394ed
4df1bfd07012dd3d2d2921281e6d6e309303b88d
Comment 2 Stefan Metzmacher 2024-08-14 08:25:08 UTC
Created attachment 18409 [details]
Patches for v4-21-test
Comment 3 Stefan Metzmacher 2024-08-14 08:25:47 UTC
Created attachment 18410 [details]
Patches for v4-20-test
Comment 4 Stefan Metzmacher 2024-08-14 08:26:17 UTC
Created attachment 18411 [details]
Patches for v4-19-test
Comment 5 Jeremy Allison 2024-08-15 17:12:13 UTC
Re-assigning to Jule for inclusion in 4.21.next, 4.20.next, 4.19.next.
Comment 6 Jule Anger 2024-08-20 07:28:01 UTC
Pushed to autobuild-v4-{21,20}-test.
I will push to 4.19 if there will be another bug-fix release.
Comment 7 Samba QA Contact 2024-08-20 09:05:19 UTC
This bug was referenced in samba v4-21-test:

64416b69784c7f2df44f930d1e9d925573138632
3805545491419cf9a0ff7f0d2b45384c1adc14bf
Comment 8 Samba QA Contact 2024-08-20 11:25:13 UTC
This bug was referenced in samba v4-21-stable (Release samba-4.21.0rc3):

64416b69784c7f2df44f930d1e9d925573138632
3805545491419cf9a0ff7f0d2b45384c1adc14bf
Comment 9 Jule Anger 2024-08-20 12:02:42 UTC
Pushed to autobuild-v4-19-test.
Comment 10 Samba QA Contact 2024-08-20 12:48:05 UTC
This bug was referenced in samba v4-20-test:

6a416edfa214c9807a65d6d62cbe2e30f836d701
0bd26677e65b700c23d07e524c1b884ee0bfe6fc
Comment 11 Samba QA Contact 2024-08-20 13:03:03 UTC
This bug was referenced in samba v4-19-test:

3db88bd0527b37ca297627cf223ed44ae9256900
2d944eb04adedf31549c9ae9ad5d46e59c449f10
Comment 12 Jule Anger 2024-08-20 13:23:38 UTC
Closing out bug report.

Thanks!
Comment 13 Samba QA Contact 2024-09-17 11:46:57 UTC
This bug was referenced in samba v4-20-stable (Release samba-4.20.5):

6a416edfa214c9807a65d6d62cbe2e30f836d701
0bd26677e65b700c23d07e524c1b884ee0bfe6fc
Comment 14 Samba QA Contact 2024-10-17 12:05:10 UTC
This bug was referenced in samba v4-19-stable (Release samba-4.19.9):

3db88bd0527b37ca297627cf223ed44ae9256900
2d944eb04adedf31549c9ae9ad5d46e59c449f10