This is an automated email from the git hooks/post-receive script.
tbordaz pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new b05c86d Ticket 50709 - (cont) Several memory leaks reported by Valgrind for
389-ds 1.3.9.1-10
b05c86d is described below
commit b05c86ddf2248c8f41c669d138340de53b31a501
Author: Thierry Bordaz <tbordaz(a)redhat.com>
AuthorDate: Mon Jan 20 10:41:08 2020 +0100
Ticket 50709 - (cont) Several memory leaks reported by Valgrind for 389-ds 1.3.9.1-10
Description of the problem:
Original fix was incorrect as it set again in pblock
(SLAPI_CONN_CLIENTNETADDR_ACLIP)
the same structure. As old structure is freed during the slapi_pblock_set,
pblock refers to a freed structure.
Later an other threads using the same aclpb contain will use it after free
(see
https://pagure.io/389-ds-base/issue/50709#comment-621129)
Description of the fix:
Only sets in pblock a newly allocated structure
https://pagure.io/389-ds-base/issue/50709
Reviewed by: Mark Reynolds (Thanks !)
---
ldap/servers/plugins/acl/acllas.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ldap/servers/plugins/acl/acllas.c b/ldap/servers/plugins/acl/acllas.c
index dd41d41..a5602e1 100644
--- a/ldap/servers/plugins/acl/acllas.c
+++ b/ldap/servers/plugins/acl/acllas.c
@@ -305,7 +305,10 @@ DS_LASIpGetter(NSErr_t *errp, PList_t subject, PList_t resource,
PList_t auth_in
slapi_log_err(SLAPI_LOG_ACL, plugin_name, "DS_LASIpGetter - "
"Returning client ip address
'unknown'\n");
}
- slapi_pblock_set(aclpb->aclpb_pblock, SLAPI_CONN_CLIENTNETADDR_ACLIP,
client_praddr);
+ if (client_praddr != pb_client_praddr) {
+ /* Set it in pblock only if it is newly allocated */
+ slapi_pblock_set(aclpb->aclpb_pblock, SLAPI_CONN_CLIENTNETADDR_ACLIP,
client_praddr);
+ }
return LAS_EVAL_TRUE;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.