diff options
author | Stefan Metzmacher <metze@samba.org> | 2015-12-23 11:05:45 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2016-04-12 19:25:32 +0200 |
commit | e31d8ded956b3ca379fb31480b7f423f1bcda458 (patch) | |
tree | e017ae3f092cd0ba255b664413089fa8dc0f1094 /libcli/smb | |
parent | 65d9ab05400f36ad5e279797b9b6461984e3b813 (diff) | |
download | samba-e31d8ded956b3ca379fb31480b7f423f1bcda458.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>
Diffstat (limited to 'libcli/smb')
-rw-r--r-- | libcli/smb/tstream_smbXcli_np.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libcli/smb/tstream_smbXcli_np.c b/libcli/smb/tstream_smbXcli_np.c index af0863e50bb..a59db13321b 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, |