diff options
author | Joseph Sutton <josephsutton@catalyst.net.nz> | 2021-05-03 16:24:42 +1200 |
---|---|---|
committer | Jule Anger <janger@samba.org> | 2021-09-16 06:50:11 +0000 |
commit | e2b0cdcb5077bd002b1bd1761e0f82bbe003b957 (patch) | |
tree | 355a3c84ed6c825295fe61afd661d5c3420dc502 /source3 | |
parent | 728d13309df756acb5e533deaf66178b667e7dff (diff) | |
download | samba-e2b0cdcb5077bd002b1bd1761e0f82bbe003b957.tar.gz |
libsmb: Ensure that whoami parses all the data provided to it
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14817
(cherry picked from commit 9b96ebea5c6966b096cf1100a0895a9c41f2aa1d)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/clifsinfo.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/libsmb/clifsinfo.c b/source3/libsmb/clifsinfo.c index c1f2eca8bcf..c4e2a01bc45 100644 --- a/source3/libsmb/clifsinfo.c +++ b/source3/libsmb/clifsinfo.c @@ -714,6 +714,13 @@ static void cli_posix_whoami_done(struct tevent_req *subreq) p += sid_size; num_rdata -= sid_size; } + + if (num_rdata != 0) { + tevent_req_nterror(req, + NT_STATUS_INVALID_NETWORK_RESPONSE); + return; + } + tevent_req_done(req); } |