Bug 15152 - SMB1 negotiation can fail to handle connection errors
Summary: SMB1 negotiation can fail to handle connection errors
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 4.17.0rc2
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
: 14704 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-08-22 04:59 UTC by Jo Sutton
Modified: 2022-09-28 15:42 UTC (History)
3 users (show)

See Also:


Attachments
Patches for v4-17-test (2.71 KB, patch)
2022-08-22 09:10 UTC, Stefan Metzmacher
metze: review? (slow)
jsutton: review+
Details
Patches for v4-16-test (2.71 KB, patch)
2022-08-22 09:11 UTC, Stefan Metzmacher
metze: review? (slow)
jsutton: review+
Details
Patches for v4-15-test (2.71 KB, patch)
2022-08-22 09:11 UTC, Stefan Metzmacher
metze: review? (slow)
jsutton: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jo Sutton 2022-08-22 04:59:43 UTC
Commit 3594c3ae202688fd8aae5f7f5e20464cb23feea9 added a NULL check for 'inhdr', but it meant the call to tevent_req_nterror() is now skipped with an early return if the NULL check fails. To fix this, we should call tevent_req_nterror() first.
    
I noticed this when an ECONNRESET error from a server refusing SMB1 wasn't handled, and the client subsequently hung in epoll_wait().
Comment 1 Samba QA Contact 2022-08-22 09:04:19 UTC
This bug was referenced in samba master:

40d4912d841e6bcd7cd37810ef101d5f89268ee7
75e03ea021afa66842b6e0dea21072b1b8026d58
Comment 2 Stefan Metzmacher 2022-08-22 09:10:40 UTC
Created attachment 17489 [details]
Patches for v4-17-test
Comment 3 Stefan Metzmacher 2022-08-22 09:11:21 UTC
Created attachment 17490 [details]
Patches for v4-16-test
Comment 4 Stefan Metzmacher 2022-08-22 09:11:46 UTC
Created attachment 17491 [details]
Patches for v4-15-test
Comment 5 Jo Sutton 2022-08-22 09:26:10 UTC
I think this must be the same bug as this one I reported a year ago: https://bugzilla.samba.org/show_bug.cgi?id=14704

I will close the other bug.
Comment 6 Jo Sutton 2022-08-22 09:26:42 UTC
*** Bug 14704 has been marked as a duplicate of this bug. ***
Comment 7 Jule Anger 2022-08-23 05:49:58 UTC
Pushed to autobuild-v4-{17,16,15}-test.
Comment 8 Samba QA Contact 2022-08-23 07:35:17 UTC
This bug was referenced in samba v4-15-test:

6b711620fe47166fa8bd6e135cce7d5b066beb5f
bb66bbfa4e74a1360307666f714f32fb77050f92
Comment 9 Samba QA Contact 2022-08-23 08:54:27 UTC
This bug was referenced in samba v4-16-test:

f33ad1c1725946c3485ab5023e0391a38ebe5fc6
f6afc5b35e733b757be8b3c16cff1c872014c8c2
Comment 10 Samba QA Contact 2022-08-23 08:58:35 UTC
This bug was referenced in samba v4-17-test:

dee2505716df4b6b08cee42816ed34708e158459
e3ee5197a6d7555173ed9372aae839f23667c487
Comment 11 Jule Anger 2022-08-23 09:34:01 UTC
Closing out bug report.

Thanks!
Comment 12 Samba QA Contact 2022-08-23 14:51:32 UTC
This bug was referenced in samba v4-17-stable (Release samba-4.17.0rc3):

dee2505716df4b6b08cee42816ed34708e158459
e3ee5197a6d7555173ed9372aae839f23667c487
Comment 13 Samba QA Contact 2022-09-07 19:02:50 UTC
This bug was referenced in samba v4-16-stable (Release samba-4.16.5):

f33ad1c1725946c3485ab5023e0391a38ebe5fc6
f6afc5b35e733b757be8b3c16cff1c872014c8c2
Comment 14 Samba QA Contact 2022-09-28 15:42:20 UTC
This bug was referenced in samba v4-15-stable (Release samba-4.15.10):

6b711620fe47166fa8bd6e135cce7d5b066beb5f
bb66bbfa4e74a1360307666f714f32fb77050f92