Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1480666 Details for
Bug 1619450
CVE-2018-14624 389-ds-base: Server crash through modify command with large DN
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch for crash in vslapd_log_emergency_error
0008-Bug-1614820-Crash-in-vslapd_log_emergency_error.patch (text/plain), 3.70 KB, created by
Doran Moppert
on 2018-09-04 04:30:05 UTC
(
hide
)
Description:
patch for crash in vslapd_log_emergency_error
Filename:
MIME Type:
Creator:
Doran Moppert
Created:
2018-09-04 04:30:05 UTC
Size:
3.70 KB
patch
obsolete
>From 59071a77774c530f0ab570dda27e23a021d23972 Mon Sep 17 00:00:00 2001 >From: Mark Reynolds <mreynolds@redhat.com> >Date: Thu, 23 Aug 2018 10:09:58 -0400 >Subject: [PATCH] Bug 1614820 - Crash in vslapd_log_emergency_error > >Description: We were not locking the error log fd before closing and reopening > the log file. This could cause a crash when multiple threads are > trying to log tothe errors log. >--- > ldap/servers/slapd/log.c | 22 ++++++++++++++++------ > 1 file changed, 16 insertions(+), 6 deletions(-) > >diff --git a/ldap/servers/slapd/log.c b/ldap/servers/slapd/log.c >index 2e4ee03a8..7dd71541b 100644 >--- a/ldap/servers/slapd/log.c >+++ b/ldap/servers/slapd/log.c >@@ -2231,11 +2231,11 @@ vslapd_log_emergency_error(LOGFD fp, const char *msg, int locked) > if (logging_hr_timestamps_enabled == 1) { > struct timespec tsnow; > if (clock_gettime(CLOCK_REALTIME, &tsnow) != 0) { >- syslog(LOG_EMERG, "vslapd_log_emergency_error, Unable to determine system time for message :: %s", msg); >+ syslog(LOG_EMERG, "vslapd_log_emergency_error, Unable to determine system time for message :: %s\n", msg); > return; > } > if (format_localTime_hr_log(tsnow.tv_sec, tsnow.tv_nsec, sizeof(tbuf), tbuf, &size) != 0) { >- syslog(LOG_EMERG, "vslapd_log_emergency_error, Unable to format system time for message :: %s", msg); >+ syslog(LOG_EMERG, "vslapd_log_emergency_error, Unable to format system time for message :: %s\n", msg); > return; > } > } else { >@@ -2243,14 +2243,14 @@ vslapd_log_emergency_error(LOGFD fp, const char *msg, int locked) > time_t tnl; > tnl = slapi_current_utc_time(); > if (format_localTime_log(tnl, sizeof(tbuf), tbuf, &size) != 0) { >- syslog(LOG_EMERG, "vslapd_log_emergency_error, Unable to format system time for message :: %s", msg); >+ syslog(LOG_EMERG, "vslapd_log_emergency_error, Unable to format system time for message :: %s\n", msg); > return; > } > #ifdef HAVE_CLOCK_GETTIME > } > #endif > >- PR_snprintf(buffer, sizeof(buffer), "%s - EMERG - %s", tbuf, msg); >+ PR_snprintf(buffer, sizeof(buffer), "%s - EMERG - %s\n", tbuf, msg); > size = strlen(buffer); > > if (!locked) { >@@ -2531,7 +2531,7 @@ vslapd_log_access(char *fmt, va_list ap) > > if (SLAPI_LOG_BUFSIZ - blen < vlen) { > /* We won't be able to fit the message in! Uh-oh! */ >- /* Should we actually just do the snprintf, and warn that message was trunced? */ >+ /* Should we actually just do the snprintf, and warn that message was truncated? */ > log__error_emergency("Insufficent buffer capacity to fit timestamp and message!", 1, 0); > return -1; > } >@@ -4486,6 +4486,13 @@ log__error_emergency(const char *errstr, int reopen, int locked) > if (!reopen) { > return; > } >+ if (!locked) { >+ /* >+ * Take the lock because we are closing and reopening the error log (fd), >+ * and we don't want any other threads trying to use this fd >+ */ >+ LOG_ERROR_LOCK_WRITE(); >+ } > if (NULL != loginfo.log_error_fdes) { > LOG_CLOSE(loginfo.log_error_fdes); > } >@@ -4494,7 +4501,10 @@ log__error_emergency(const char *errstr, int reopen, int locked) > PRErrorCode prerr = PR_GetError(); > syslog(LOG_ERR, "Failed to reopen errors log file, " SLAPI_COMPONENT_NAME_NSPR " error %d (%s)\n", prerr, slapd_pr_strerror(prerr)); > } else { >- vslapd_log_emergency_error(loginfo.log_error_fdes, errstr, locked); >+ vslapd_log_emergency_error(loginfo.log_error_fdes, errstr, 1 /* locked */); >+ } >+ if (!locked) { >+ LOG_ERROR_UNLOCK_WRITE(); > } > return; > } >-- >2.17.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1619450
: 1480666