1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

s3: libsmb: cli_setatr() and async version. Don't allow attribtes > 16 bits on an old protocol send.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
Jeremy Allison 2020-06-03 21:11:25 -07:00
parent 7c3f3add32
commit 199a7343ee

View File

@ -4521,6 +4521,16 @@ struct tevent_req *cli_setatr_send(TALLOC_CTX *mem_ctx,
return NULL;
}
if (attr & 0xFFFF0000) {
/*
* Don't allow attributes greater than
* 16-bits for a 16-bit protocol value.
*/
if (tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER)) {
return tevent_req_post(req, ev);
}
}
SSVAL(state->vwv+0, 0, attr);
push_dos_date3((uint8_t *)&state->vwv[1], 0, mtime, smb1cli_conn_server_time_zone(cli->conn));