Bug 11358 - Winbindd: parent-child protocol breaks if a request is canceled
Winbindd: parent-child protocol breaks if a request is canceled
Status: ASSIGNED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Winbind
4.2.2
All All
: P5 normal
: ---
Assigned To: Stefan Metzmacher
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-06-24 18:35 UTC by Uri Simchoni
Modified: 2015-07-11 19:59 UTC (History)
3 users (show)

See Also:


Attachments
Proposed fix to master (4.01 KB, patch)
2015-06-24 18:42 UTC, Uri Simchoni
no flags Details
Patches for v4-2-test (4.30 KB, patch)
2015-06-30 08:21 UTC, Stefan Metzmacher
asn: review+
Details
Patches for v4-1-test (4.29 KB, patch)
2015-06-30 08:21 UTC, Stefan Metzmacher
asn: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Uri Simchoni 2015-06-24 18:35:43 UTC
When cancelling a request at the main winbindd process, that is currently
being served by a child winbindd process, just freeing all objects related
to the request is not enough, as the next bytes to come through the pipe
from the child process are the response to the cancelled request, and the
object reading those bytes will be the next request. This breaks the protocol.

There's no clear scenario of how to reproduce this, but in general winbindd  __currently__ may cancel requests if their service time (from client's perspective, i.e. including waiting for other requests to complete) exceeds "winbind request timeout", or if the number of clients exceeds "winbind max clients" and this is the oldest request.
Comment 1 Uri Simchoni 2015-06-24 18:42:20 UTC
Created attachment 11194 [details]
Proposed fix to master
Comment 2 Stefan Metzmacher 2015-06-30 08:21:15 UTC
Created attachment 11214 [details]
Patches for v4-2-test
Comment 3 Stefan Metzmacher 2015-06-30 08:21:50 UTC
Created attachment 11215 [details]
Patches for v4-1-test
Comment 4 Andreas Schneider 2015-06-30 09:11:28 UTC
Karolin, please add the patches to 4.2 and 4.1. Thanks!
Comment 5 Karolin Seeger 2015-07-05 19:28:04 UTC
Pushed to autobuild-v4-[1|2]-test.
Comment 6 Karolin Seeger 2015-07-11 19:57:34 UTC
Patch breaks 4.1 build:

[3077/4133] Compiling source3/winbindd/winbindd_dual.c
../source3/winbindd/winbindd_dual.c: In function 'wb_child_request_send':
../source3/winbindd/winbindd_dual.c:141: error: implicit declaration of function 'tevent_req_set_cleanup_fn'
Comment 7 Karolin Seeger 2015-07-11 19:59:02 UTC
Pushed to v4-2-test.