1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

CVE-2016-2115: s3:libsmb: add signing constant SMB_SIGNING_IPC_DEFAULT

SMB_SIGNING_IPC_DEFAULT must be used from s3 client code when opening
RPC connections.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11756

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Ralph Boehme 2015-12-16 09:55:37 +01:00 committed by Stefan Metzmacher
parent a046ffd6cd
commit b720575f16
5 changed files with 16 additions and 1 deletions

View File

@ -3393,10 +3393,13 @@ bool lpcfg_server_signing_allowed(struct loadparm_context *lp_ctx, bool *mandato
case SMB_SIGNING_DESIRED:
case SMB_SIGNING_IF_REQUIRED:
break;
case SMB_SIGNING_DEFAULT:
case SMB_SIGNING_OFF:
allowed = false;
break;
case SMB_SIGNING_DEFAULT:
case SMB_SIGNING_IPC_DEFAULT:
smb_panic(__location__);
break;
}
return allowed;

View File

@ -382,6 +382,7 @@ struct smbXcli_conn *smbXcli_conn_create(TALLOC_CTX *mem_ctx,
conn->desire_signing = true;
conn->mandatory_signing = false;
break;
case SMB_SIGNING_IPC_DEFAULT:
case SMB_SIGNING_REQUIRED:
/* always */
conn->allow_signing = true;

View File

@ -95,6 +95,7 @@ enum protocol_types {
#define PROTOCOL_LATEST PROTOCOL_SMB3_11
enum smb_signing_setting {
SMB_SIGNING_IPC_DEFAULT = -2, /* Only used in C code */
SMB_SIGNING_DEFAULT = -1,
SMB_SIGNING_OFF = 0,
SMB_SIGNING_IF_REQUIRED = 1,

View File

@ -170,6 +170,15 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
use_level_II_oplocks = true;
}
if (signing_state == SMB_SIGNING_IPC_DEFAULT) {
/*
* Ensure for IPC/RPC the default is to require
* signing unless explicitly turned off by the
* administrator.
*/
signing_state = lp_client_ipc_signing();
}
if (signing_state == SMB_SIGNING_DEFAULT) {
signing_state = lp_client_signing();
}

View File

@ -147,6 +147,7 @@ static NTSTATUS smb2srv_negprot_backend(struct smb2srv_request *req, struct smb2
switch (signing_setting) {
case SMB_SIGNING_DEFAULT:
case SMB_SIGNING_IPC_DEFAULT:
smb_panic(__location__);
break;
case SMB_SIGNING_OFF: