diff options
author | Gary Lockyer <gary@catalyst.net.nz> | 2021-03-25 11:30:59 +1300 |
---|---|---|
committer | Jule Anger <janger@samba.org> | 2022-09-18 16:46:09 +0000 |
commit | 6b826a375a13f44a0486024ee09564cf3b1528ca (patch) | |
tree | c488858008056683b9916ce5233770e7e6824da7 /source4/auth | |
parent | a9aae34d5a97081dff9126328167678cfc4601c7 (diff) | |
download | samba-6b826a375a13f44a0486024ee09564cf3b1528ca.tar.gz |
CVE-2021-20251 auth4: Return only the result message and free the surrounding result
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14611
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit b954acfde258a1909ed60c1c3e1015701582719f)
Diffstat (limited to 'source4/auth')
-rw-r--r-- | source4/auth/sam.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/auth/sam.c b/source4/auth/sam.c index 2a63238d1b9..3190577818c 100644 --- a/source4/auth/sam.c +++ b/source4/auth/sam.c @@ -885,7 +885,8 @@ NTSTATUS authsam_reread_user_logon_data( TALLOC_FREE(res); return NT_STATUS_ACCOUNT_LOCKED_OUT; } - *current = res->msgs[0]; + *current = talloc_steal(mem_ctx, res->msgs[0]); + TALLOC_FREE(res); return NT_STATUS_OK; } |