diff --git a/SOURCES/rsyslog-8.24.0-rhbz1725067-imjournal-memleak.patch b/SOURCES/rsyslog-8.24.0-rhbz1725067-imjournal-memleak.patch index e55df58..b44b030 100644 --- a/SOURCES/rsyslog-8.24.0-rhbz1725067-imjournal-memleak.patch +++ b/SOURCES/rsyslog-8.24.0-rhbz1725067-imjournal-memleak.patch @@ -17,7 +17,7 @@ index a85e521003..f5c2be4b6e 100644 /* save journal cursor (at this point we can be sure it is valid) */ - sd_journal_get_cursor(j, &c); - if (c) { -+ if (sd_journal_get_cursor(j, &c)) { ++ if (!sd_journal_get_cursor(j, &c)) { free(last_cursor); last_cursor = c; } diff --git a/SOURCES/rsyslog-8.24.0-rhbz1746497-ratelimiter-segfault.patch b/SOURCES/rsyslog-8.24.0-rhbz1746497-ratelimiter-segfault.patch new file mode 100644 index 0000000..6089930 --- /dev/null +++ b/SOURCES/rsyslog-8.24.0-rhbz1746497-ratelimiter-segfault.patch @@ -0,0 +1,41 @@ +From b54769b4d8371ce1d60e3c43172a445336ec79b6 Mon Sep 17 00:00:00 2001 +From: Rainer Gerhards +Date: Mon, 24 Sep 2018 13:27:26 +0200 +Subject: [PATCH] bugfix imfile: segfault in ratelimiter + +imfile crashes inside rate limit processing, often when log +files are rotated. However, this could occur in any case where +the monitored files was closed by imfile, it rotation is just +the most probable cause for this (moving the file to another +directory or deleting it also can trigger the same issue, for +example). The root cause was invalid sequence of operations. + +closes https://github.com/rsyslog/rsyslog/issues/3021 +--- + plugins/imfile/imfile.c | 8 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c +index e710f7c44c..f4a4ef9b72 100644 +--- a/plugins/imfile/imfile.c ++++ b/plugins/imfile/imfile.c +@@ -915,9 +915,6 @@ act_obj_destroy(act_obj_t *const act, const int is_deleted) + } + } + } +- if(act->ratelimiter != NULL) { +- ratelimitDestruct(act->ratelimiter); +- } + if(act->pStrm != NULL) { + const instanceConf_t *const inst = act->edge->instarr[0];// TODO: same file, multiple instances? + pollFile(act); /* get any left-over data */ +@@ -934,6 +931,9 @@ act_obj_destroy(act_obj_t *const act, const int is_deleted) + unlink((char*)statefn); + } + } ++ if(act->ratelimiter != NULL) { ++ ratelimitDestruct(act->ratelimiter); ++ } + #ifdef HAVE_INOTIFY_INIT + if(act->wd != -1) { + wdmapDel(act->wd); diff --git a/SPECS/rsyslog.spec b/SPECS/rsyslog.spec index f04dee2..17c0763 100644 --- a/SPECS/rsyslog.spec +++ b/SPECS/rsyslog.spec @@ -14,7 +14,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.24.0 -Release: 41%{?dist} +Release: 41%{?dist}.2 License: (GPLv3+ and ASL 2.0) Group: System Environment/Daemons URL: http://www.rsyslog.com/ @@ -115,6 +115,8 @@ Patch52: rsyslog-8.24.0-doc-rhbz1625935-mmkubernetes-CRI-O.patch Patch53: rsyslog-8.24.0-rhbz1656860-imfile-buffer-overflow.patch Patch54: rsyslog-8.24.0-rhbz1725067-imjournal-memleak.patch +Patch55: rsyslog-8.24.0-rhbz1746497-ratelimiter-segfault.patch + %package crypto Summary: Encryption support Group: System Environment/Daemons @@ -419,6 +421,8 @@ mv build doc %patch53 -p1 -b .imfile-buffer-overflow %patch54 -p1 -b .imjournal-memleak +%patch55 -p1 -b .ratelimit-crash + autoreconf %build @@ -677,6 +681,16 @@ done %{_libdir}/rsyslog/mmkubernetes.so %changelog +* Mon Sep 23 2019 Jiri Vymazal - 8.24.0-41.2 +RHEL 7.7.z ERRATUM +- edited imjournal memleaks patch to fix introduced regression + resolves: rhbz#1752424 + +* Mon Sep 02 2019 Jiri Vymazal - 8.24.0-41.1 +RHEL 7.7.z ERRATUM +- added patch resolving possible segfault in core-ratelimiter + resolves: rhbz#1746497 + * Tue Jul 23 2019 Jiri Vymazal - 8.24.0-41 RHEL 7.7.z ERRATUM - added patch resolving memory leaks in imjournal