#50830 Issue 50829 - Disk monitoring rotated log cleanup causes heap-use-after-free
Closed 3 years ago by spichugi. Opened 4 years ago by mreynolds.
mreynolds/389-ds-base issue50829  into  master

@@ -3259,6 +3259,12 @@ 

          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

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

rebased onto bb3ac59

4 years ago

Pull-Request has been merged by mreynolds

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3884

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

3 years ago
Metadata