summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2020-06-03 21:11:25 -0700
committerJeremy Allison <jra@samba.org>2020-06-04 17:11:39 +0000
commit199a7343eea93eee6682a188d43523b9a325ec33 (patch)
tree444d547a8dc378bcec2536d1f7ae1d3dc3d4839e /source3
parent7c3f3add3250e4ec9c9a39aefc1932b6172b04b3 (diff)
downloadsamba-199a7343eea93eee6682a188d43523b9a325ec33.tar.gz
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>
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clifile.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index d603775b25f..6c75759bbca 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -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));