summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2015-12-23 11:05:45 +0100
committerStefan Metzmacher <metze@samba.org>2016-03-30 04:10:17 +0200
commit8e0b06a895002842fa7516d5e0364f0fbca85a64 (patch)
tree669415cff71006d2b25a1b90c6b4432d1a8661a5
parent3ef461d8304ee36184cd7a3963676eedff4ef1eb (diff)
downloadsamba-8e0b06a895002842fa7516d5e0364f0fbca85a64.tar.gz
CVE-2015-5370: libcli/smb: use a max timeout of 1 second in tstream_smbXcli_np_destructor()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11344 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
-rw-r--r--libcli/smb/tstream_smbXcli_np.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcli/smb/tstream_smbXcli_np.c b/libcli/smb/tstream_smbXcli_np.c
index 9cd6302c8c7..248bfb02cfc 100644
--- a/libcli/smb/tstream_smbXcli_np.c
+++ b/libcli/smb/tstream_smbXcli_np.c
@@ -111,7 +111,11 @@ static int tstream_smbXcli_np_destructor(struct tstream_smbXcli_np *cli_nps)
* Once we've fixed all callers to call
* tstream_disconnect_send()/_recv(), this will
* never be called.
+ *
+ * We use a maximun timeout of 1 second == 1000 msec.
*/
+ cli_nps->timeout = MIN(cli_nps->timeout, 1000);
+
if (cli_nps->is_smb1) {
status = smb1cli_close(cli_nps->conn,
cli_nps->timeout,