Package: release.debian.org Severity: normal Tags: jessie User: release.debian....@packages.debian.org Usertags: pu
Hi, I'd like to make a stable upload for rsyslog in jessie to fix a bug in the imfile module. If more then one file is monitored, rsyslog segfaults when using the inotify backend (which is used by default). This issue has been fixed upstream and the fixed version is in sid/stretch for quite a while. In http://bugs.debian.org/770998 I was asked if I can pull this fix for stable. I cherry-picked the upstream commit and I could confirm that this fixes the segfault. Complete debdiff is attached. Please let me know if I can proceed with the upload so this fix can make it into 8.3 Regards, Michael -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable'), (200, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.3.0-trunk-amd64 (SMP w/4 CPU cores) Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
diff --git a/debian/changelog b/debian/changelog index 0b01623..f9a8ae8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +rsyslog (8.4.2-1+deb8u2) jessie; urgency=medium + + * Fix crash in imfile module when using inotify mode. + Patch cherry-picked from upstream Git. (Closes: #770998) + + -- Michael Biebl <bi...@debian.org> Thu, 10 Dec 2015 22:20:45 +0100 + rsyslog (8.4.2-1+deb8u1) jessie; urgency=medium * Disable transactions in ompgsql as they were not working properly. diff --git a/debian/patches/0003-bugfix-imfile-segfault-on-startup-in-inotify-mode.patch b/debian/patches/0003-bugfix-imfile-segfault-on-startup-in-inotify-mode.patch new file mode 100644 index 0000000..baae04b --- /dev/null +++ b/debian/patches/0003-bugfix-imfile-segfault-on-startup-in-inotify-mode.patch @@ -0,0 +1,24 @@ +From: Rainer Gerhards <rgerha...@adiscon.com> +Date: Thu, 9 Oct 2014 08:22:39 +0200 +Subject: bugfix imfile: segfault on startup in "inotify" mode + +A segfault happened when more than one file was monitored. + +(cherry-picked from commit 8bf43525fe1bf08fd542ad054c987ccf7c97616c) +--- + plugins/imfile/imfile.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c +index d37cb03..1dde52f 100644 +--- a/plugins/imfile/imfile.c ++++ b/plugins/imfile/imfile.c +@@ -1093,7 +1093,7 @@ dirsAddFile(int i) + + if(dir->currMaxFiles == dir->allocMaxFiles) { + newMax = 2 * allocMaxFiles; +- newFileTab = realloc(dirs, newMax * sizeof(dirInfoFiles_t)); ++ newFileTab = realloc(dirs->files, newMax * sizeof(dirInfoFiles_t)); + if(newFileTab == NULL) { + errmsg.LogError(0, RS_RET_OUT_OF_MEMORY, + "cannot alloc memory to map directory '%s' file relationship " diff --git a/debian/patches/series b/debian/patches/series index 8351e07..b0c49c1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 0001-Don-t-create-a-database.patch 0002-bugfix-ompgsql-transaction-were-improperly-handled.patch +0003-bugfix-imfile-segfault-on-startup-in-inotify-mode.patch