This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.1
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.1 by this push:
new 16f7b52 Issue 50829 - Disk monitoring rotated log cleanup causes
heap-use-after-free
16f7b52 is described below
commit 16f7b525e69dcf0ced273c2782ba9b00c28372cb
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Fri Jan 17 15:42:00 2020 -0500
Issue 50829 - Disk monitoring rotated log cleanup causes heap-use-after-free
Description: When Disk Monitoring finds that disk space is too low it starts
freeing up disk space by removing rotated logs. However the log
list struct was not properly reset after freeing all the files
in the list. This is what allowed the heap-use-after-free to
occur.
relates:
https://pagure.io/389-ds-base/issue/50829
Reviewed by: firstyear(Thanks!)
---
ldap/servers/slapd/log.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/ldap/servers/slapd/log.c b/ldap/servers/slapd/log.c
index bfcf574..b16e56b 100644
--- a/ldap/servers/slapd/log.c
+++ b/ldap/servers/slapd/log.c
@@ -3243,6 +3243,12 @@ log__delete_rotated_logs()
logp = logp->l_next;
slapi_ch_free((void **)&prev_log);
}
+
+ /* reset the log struct */
+ loginfo.log_access_logchain = NULL;
+ loginfo.log_audit_logchain = NULL;
+ loginfo.log_auditfail_logchain = NULL;
+ loginfo.log_error_logchain = NULL;
}
#define ERRORSLOG 1
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.