diff --git a/bugfix-omusrmsg-initialize-sessions_list-to-avoid-co.patch b/bugfix-omusrmsg-initialize-sessions_list-to-avoid-co.patch new file mode 100644 index 0000000000000000000000000000000000000000..c30050721c7bba3d2ca04ab1113d2108a3432499 --- /dev/null +++ b/bugfix-omusrmsg-initialize-sessions_list-to-avoid-co.patch @@ -0,0 +1,30 @@ +From aeacbfd60594240db3b633185ad2130a57d0b13c Mon Sep 17 00:00:00 2001 +From: wangmeiyang +Date: Wed, 10 Dec 2025 20:37:55 +0800 +Subject: [PATCH] bugfix omusrmsg: initialize sessions_list to avoid coredump + +During long-term stability testing using LTP, rsyslog +occasionally crashes. After investigation, it was found +that in wallmsg function, the sessions_list is not +initialized, and sd_get_sessions returns a negative value, +leading to a crash when free(sessions_list) is called. +--- + tools/omusrmsg.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/omusrmsg.c b/tools/omusrmsg.c +index 50eade5..8f6388c 100644 +--- a/tools/omusrmsg.c ++++ b/tools/omusrmsg.c +@@ -271,7 +271,7 @@ static rsRetVal wallmsg(uchar* pMsg, instanceData *pData) + if (sd_booted() > 0) { + register int j; + int sdRet; +- char **sessions_list; ++ char **sessions_list = NULL; + int sessions = sd_get_sessions(&sessions_list); + + for (j = 0; j < sessions; j++) { +-- +2.33.0 + diff --git a/rsyslog.spec b/rsyslog.spec index 8209c22c6785c212231859d4ba41fd3dfa25b230..bfe06c77186617c0849c0a977459aac67c445513 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -7,7 +7,7 @@ Name: rsyslog Version: 8.2312.0 -Release: 10 +Release: 11 Summary: The rocket-fast system for log processing License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ @@ -35,6 +35,7 @@ Patch6002: backport-omfile-do-not-carry-out-actual-action-when-writing-to-d Patch6003: backport-fix-memory-leak-in-omazureeventhubs-on-accepted-PN_D.patch Patch9006: tls-bugfix-parameter-StreamDriver_CRLFile-not-known.patch +Patch9007: bugfix-omusrmsg-initialize-sessions_list-to-avoid-co.patch Patch6004: backport-Fix-passing-the-value-to-EscapeChar.patch Patch6005: backport-Do-not-free-the-uninitialized-cstring.patch @@ -538,6 +539,12 @@ done %{_mandir}/man1/rscryutil.1.gz %changelog +* Tue Dec 2 2025 wangmeiyang - 8.2312.0-11 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: bugfix omusrmsg: initialize sessions_list to avoid coredump + * Sat Oct 25 2025 zhangqiumiao - 8.2312.0-10 - Type:bugfix - ID:NA