Package: release.debian.org
Severity: normal
Tags: bookworm
X-Debbugs-Cc: rsys...@packages.debian.org
Control: affects -1 + src:rsyslog
User: release.debian....@packages.debian.org
Usertags: pu

Hi,

I'd like to make a stable upload for rsyslog fixing
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1092450

The patch is cherry-picked from upstream Git and has been uploaded to
unstable as part of 8.2412.0-1.

Full debdiff is attached.

Regards,
Michael
diff --git a/debian/changelog b/debian/changelog
index 6803461d6..51076d4fd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+rsyslog (8.2302.0-1+deb12u1) bookworm; urgency=medium
+
+  * Fix runConf NULL pointer reference.
+    If rsyslogd hasn't fully parsed its configuration, runConf will be NULL.
+    Receiving a SIGTERM at this point will trigger a segmentation fault.
+    So check the pointer before referencing it to allow for a clean restart.
+    Patch cherry-picked from upstream Git. (Closes: #1092450)
+  * Switch debian-branch to debian/bookworm
+
+ -- Michael Biebl <bi...@debian.org>  Wed, 08 Jan 2025 19:13:05 +0100
+
 rsyslog (8.2302.0-1) unstable; urgency=medium
 
   * New upstream version 8.2302.0
diff --git a/debian/gbp.conf b/debian/gbp.conf
index 05e704d03..7a75dbc3b 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -1,5 +1,5 @@
 [DEFAULT]
 pristine-tar = True
 patch-numbers = False
-debian-branch = debian/master
+debian-branch = debian/bookworm
 upstream-branch = upstream/latest
diff --git a/debian/patches/Fix-runConf-NULL-pointer-refence.patch 
b/debian/patches/Fix-runConf-NULL-pointer-refence.patch
new file mode 100644
index 000000000..3bd773d64
--- /dev/null
+++ b/debian/patches/Fix-runConf-NULL-pointer-refence.patch
@@ -0,0 +1,27 @@
+From: Wang Haitao <45086632+apple-ouy...@users.noreply.github.com>
+Date: Fri, 20 Sep 2024 17:50:37 +0800
+Subject: Fix runConf NULL pointer refence
+
+`systemd restart rsyslog` in the early start of OS will let rsyslog 
segmentation fault.
+This cmd will send sigTerm to rsylogd, and rsyslogd will handle the signal in 
rsyslogdDoDie.
+If the rsyslogd havn't parse the conf, the runConf will be NULL
+So check the pointer before reference it.
+
+(cherry picked from commit d38e4b7bfc5bd0137914859837dcc04076b9e1ea)
+---
+ tools/rsyslogd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/rsyslogd.c b/tools/rsyslogd.c
+index 77d814b..e46c723 100644
+--- a/tools/rsyslogd.c
++++ b/tools/rsyslogd.c
+@@ -1834,7 +1834,7 @@ rsyslogdDoDie(int sig)
+               abort();
+       }
+       bFinished = sig;
+-      if(runConf->globals.debugOnShutdown) {
++      if(runConf && runConf->globals.debugOnShutdown) {
+               /* kind of hackish - set to 0, so that debug_swith will enable
+                * and AND emit the "start debug log" message.
+                */
diff --git a/debian/patches/series b/debian/patches/series
index d44f82968..bc13e8ad5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 Don-t-create-a-database.patch
 Increase-timeouts-in-imfile-basic-2GB-file-and-imfile-tru.patch
+Fix-runConf-NULL-pointer-refence.patch

Reply via email to