diff -Nru rsyslog-7.4.4/debian/changelog rsyslog-7.4.4/debian/changelog --- rsyslog-7.4.4/debian/changelog 2015-04-30 19:36:47.000000000 +0000 +++ rsyslog-7.4.4/debian/changelog 2017-07-18 10:25:28.000000000 +0000 @@ -1,3 +1,12 @@ +rsyslog (7.4.4-1ubuntu2.7) trusty; urgency=medium + + * Fixing timestamp abnormals on rsyslog when using cron (LP: #1429427) + - bugfix: plug a memleak in imuxsock + - commit hash be45099, 7a2e247 + - debian/patches/bugfix-plug-a-memleak-in-imuxsock.patch + + -- Seyeong Kim Tue, 18 Jul 2017 09:55:26 +0000 + rsyslog (7.4.4-1ubuntu2.6) trusty-proposed; urgency=medium * debian/usr.sbin.rsyslog: grant read access to /dev/log to cope with diff -Nru rsyslog-7.4.4/debian/patches/bugfix-plug-a-memleak-in-imuxsock.patch rsyslog-7.4.4/debian/patches/bugfix-plug-a-memleak-in-imuxsock.patch --- rsyslog-7.4.4/debian/patches/bugfix-plug-a-memleak-in-imuxsock.patch 1970-01-01 00:00:00.000000000 +0000 +++ rsyslog-7.4.4/debian/patches/bugfix-plug-a-memleak-in-imuxsock.patch 2017-07-18 10:28:03.000000000 +0000 @@ -0,0 +1,80 @@ +From 7a2e2473476d2b10a775affd9ac6c62b81c450e5 Mon Sep 17 00:00:00 2001 +From: Tomas Heinrich +Date: Thu, 24 Jul 2014 13:47:14 +0200 +Subject: [PATCH 1/2] bugfix: plug a memleak in imuxsock + +The hash table for the system socket was allocated twice. The other +one being in activateListeners(). + +This commit practically reverts: 34a77cde2423303da72ab773128a2ddcf41 +The issue seems to be that the hash table is not initialized (to NULL) +rather then not being allocated. +--- + plugins/imuxsock/imuxsock.c | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +From be45099574189b2f947e3a61f2c38aea43c33da1 Mon Sep 17 00:00:00 2001 +From: Tomas Heinrich +Date: Thu, 24 Jul 2014 16:32:28 +0200 +Subject: [PATCH 2/2] bugfix: plug a memleak in imuxsock + +Hash table and rate limiter for the system socket weren't freed. + +A side-effect was that the "Last message repeated..." notice didn't +get printed if rsyslog was shut down before the repetition was broken. +--- + plugins/imuxsock/imuxsock.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +Origin: upstream, https://github.com/rsyslog/rsyslog/commit/7a2e2473476d2b10a775affd9ac6c62b81c450e5 +Origin: upstream, https://github.com/rsyslog/rsyslog/commit/be45099574189b2f947e3a61f2c38aea43c33da1 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/rsyslog/+bug/1429427 + +Index: rsyslog-7.4.4/plugins/imuxsock/imuxsock.c +=================================================================== +--- rsyslog-7.4.4.orig/plugins/imuxsock/imuxsock.c 2017-07-18 10:24:24.777492000 +0000 ++++ rsyslog-7.4.4/plugins/imuxsock/imuxsock.c 2017-07-18 10:24:24.773492000 +0000 +@@ -425,13 +425,17 @@ + } + + +-/* discard/Destruct all log sockets except for "socket" 0. Data for it comes from +- * the constant memory pool - and if not, it is freeed via some other pointer. +- */ + static rsRetVal discardLogSockets(void) + { + int i; + ++ /* Clean up rate limiting data for the system socket */ ++ if(listeners[0].ht != NULL) { ++ hashtable_destroy(listeners[0].ht, 1); /* 1 => free all values automatically */ ++ } ++ ratelimitDestruct(listeners[0].dflt_ratelimiter); ++ ++ /* Clean up all other sockets */ + for (i = 1; i < nfd; i++) { + if(listeners[i].sockName != NULL) { + free(listeners[i].sockName); +@@ -1058,6 +1062,8 @@ + "create hash table\n"); + runModConf->ratelimitIntervalSysSock = 0; + } ++ } else { ++ listeners[0].ht = NULL; + } + listeners[0].ratelimitInterval = runModConf->ratelimitIntervalSysSock; + listeners[0].ratelimitBurst = runModConf->ratelimitBurstSysSock; +@@ -1521,13 +1527,6 @@ + listeners[0].bUnlink = 1; + listeners[0].bCreatePath = 0; + listeners[0].bUseSysTimeStamp = 1; +- if((listeners[0].ht = create_hashtable(100, hash_from_key_fn, key_equals_fn, +- (void(*)(void*))ratelimitDestruct)) == NULL) { +- /* in this case, we simply turn off rate-limiting */ +- DBGPRINTF("imuxsock: turning off rate limiting for system socket " +- "because we could not create hash table\n"); +- listeners[0].ratelimitInterval = 0; +- } + + /* initialize socket names */ + for(i = 1 ; i < MAXFUNIX ; ++i) { diff -Nru rsyslog-7.4.4/debian/patches/series rsyslog-7.4.4/debian/patches/series --- rsyslog-7.4.4/debian/patches/series 2015-01-05 18:52:43.000000000 +0000 +++ rsyslog-7.4.4/debian/patches/series 2017-07-18 10:24:23.000000000 +0000 @@ -3,3 +3,4 @@ 10-initgroups.patch CVE-2014-3634.patch 11-fix-infinite-loop-openvz-vms.patch +bugfix-plug-a-memleak-in-imuxsock.patch