]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: libsmb: cli_unlink() and async version. Don't allow attribtes > 16 bits on an...
authorJeremy Allison <jra@samba.org>
Thu, 4 Jun 2020 04:07:33 +0000 (21:07 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 4 Jun 2020 17:11:39 +0000 (17:11 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/libsmb/clifile.c

index 65891e0e6a1fc1dd62c183c57ac153e1313c9cc0..d603775b25f6764ffd16145352ae0c265146adcb 100644 (file)
@@ -1890,6 +1890,16 @@ struct tevent_req *cli_unlink_send(TALLOC_CTX *mem_ctx,
                return req;
        }
 
+       if (mayhave_attrs & 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, mayhave_attrs);
 
        bytes = talloc_array(state, uint8_t, 1);