[packages/rsyslog] Up to 8.2610.0

arekm arekm at pld-linux.org
Fri Nov 27 21:45:57 CET 2026


commit b659e28b7e6f210b95e211e672d866cf1cec5550
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Nov 27 15:25:07 2026 +0100

    Up to 8.2610.0
    
    Fixes CVE-2026-132145, CVE-2026-129839, CVE-2026-129838,
    CVE-2026-129837, CVE-2026-129836, CVE-2026-129835, CVE-2026-129834,
    CVE-2026-129833, CVE-2026-129832, CVE-2026-129831, CVE-2026-129830,
    CVE-2026-129829, CVE-2026-93404, CVE-2026-93403, CVE-2026-93402,
    CVE-2026-78002, CVE-2026-61548, CVE-2026-55556, CVE-2026-19654.

 rsyslog-imdtls-session-hardening.patch  | 276 ++++++++++++++++++++++++++++++++
 rsyslog-imuxsock-hardening.patch        | 267 ++++++++++++++++++++++++++++++
 rsyslog-json-escape-special.patch       |  14 ++
 rsyslog-mmanon-embedded-ipv4.patch      |  25 +++
 rsyslog-omclickhouse-sql-escaping.patch |  81 ++++++++++
 rsyslog-omdtls-verify-peer.patch        | 211 ++++++++++++++++++++++++
 rsyslog-tirpc.patch                     |  12 +-
 rsyslog-weekday-low-year.patch          |  20 +++
 rsyslog.spec                            |  99 +++++++++---
 9 files changed, 980 insertions(+), 25 deletions(-)
---
diff --git a/rsyslog.spec b/rsyslog.spec
index 1a86579..d864e17 100644
--- a/rsyslog.spec
+++ b/rsyslog.spec
@@ -8,6 +8,7 @@
 %bcond_without	dbi		# database support via libdbi
 %bcond_without	grok		# mmgrok support
 %bcond_without	gssapi		# GSSAPI Kerberos 5 support
+%bcond_with	impstats_push	# no impstats native push (VictoriaMetrics Remote Write)
 %bcond_without	kafka		# Kafka output support
 %bcond_without	ksi		# log file signing support (via GuardTime KSI LS12)
 %bcond_without	lognorm		# normalization modules
@@ -33,31 +34,41 @@ Summary(pl.UTF-8):	Programy logujące zdarzenia w systemie i jądrze Linuksa
 Summary(pt_BR.UTF-8):	Registrador de log do sistema linux
 Summary(tr.UTF-8):	Linux sistem ve çekirdek kayıt süreci
 Name:		rsyslog
-Version:	8.2512.0
-Release:	2
+Version:	8.2610.0
+Release:	1
 License:	GPL v3+
 Group:		Daemons
 #Source0Download: https://www.rsyslog.com/downloads/download-v8-stable/
 Source0:	https://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz
-# Source0-md5:	744e44c74f9ecd97ee800c78dc8271d3
+# Source0-md5:	9d374643851365a2daefcdf43059259f
 Source1:	%{name}.init
 Source2:	%{name}.conf
 Source3:	%{name}.sysconfig
 Source4:	%{name}.logrotate
 Source5:	%{name}.service
 Patch0:		%{name}-tirpc.patch
+Patch1:		%{name}-omclickhouse-sql-escaping.patch
+Patch2:		%{name}-imuxsock-hardening.patch
+Patch3:		%{name}-imdtls-session-hardening.patch
+Patch4:		%{name}-omdtls-verify-peer.patch
+Patch5:		%{name}-mmanon-embedded-ipv4.patch
+Patch6:		%{name}-weekday-low-year.patch
+Patch7:		%{name}-json-escape-special.patch
 URL:		https://www.rsyslog.com/
 BuildRequires:	autoconf >= 2.61
 BuildRequires:	automake
-%{?with_zeromq:BuildRequires:	czmq-devel >= 3.0.2}
+%{?with_curl:BuildRequires:	curl-devel >= 7.75.0}
+%{?with_impstats_push:BuildRequires:	curl-devel >= 7.40.0}
+%{?with_zeromq:BuildRequires:	czmq-devel >= 4.0.0}
 %{?with_grok:BuildRequires:	glib2-devel >= 2.0}
 BuildRequires:	gnutls-devel >= 1.4.0
 %{?with_grok:BuildRequires:	grok-devel}
 %{?with_gssapi:BuildRequires:	heimdal-devel}
 %{?with_redis:BuildRequires:	hiredis-devel >= 0.10.1}
 BuildRequires:	libdbi-devel
+%{?with_redis:BuildRequires:	libevent-devel >= 2.0}
 BuildRequires:	libestr-devel >= 0.1.9
-BuildRequires:	libfastjson-devel >= 0.99.8
+BuildRequires:	libfastjson-devel >= 0.99.9
 BuildRequires:	libgcrypt-devel >= 1.11.2-2
 %{?with_ksi:BuildRequires:	libksi-devel >= 3.19.0}
 %{?with_rfc3195:BuildRequires:	liblogging-rfc3195-devel >= 1.0.1}
@@ -75,14 +86,19 @@ BuildRequires:	zstd-devel >= 1.4.0
 %{?with_mysql:BuildRequires:	mysql-devel}
 %{?with_snmp:BuildRequires:	net-snmp-devel}
 %{?with_openssl:BuildRequires:	openssl-devel >= 1.1.0}
-%{?with_amqp:BuildRequires:	qpid-proton-c-devel >= 0.9}
+%{?with_amqp:BuildRequires:	qpid-proton-c-devel >= 0.13}
 BuildRequires:	pkgconfig
 %{?with_pgsql:BuildRequires:	postgresql-devel}
+%{?with_curl:BuildRequires:	protobuf-c-devel >= 1.0.0}
+%{?with_impstats_push:BuildRequires:	protobuf-c-devel >= 1.0.0}
+BuildRequires:	python3
 %{?with_rabbitmq:BuildRequires:	rabbitmq-c-devel >= 0.2.0}
 BuildRequires:	rpmbuild(macros) >= 1.626
+%{?with_impstats_push:BuildRequires:	snappy-devel}
 %{?with_systemd:BuildRequires:	systemd-devel >= 1:234}
 %{?with_tcl:BuildRequires:	tcl-devel}
 BuildRequires:	xxHash-devel
+BuildRequires:	yaml-devel
 BuildRequires:	zlib-devel
 Requires(post):	fileutils
 Requires(post):	sed >= 4.0
@@ -101,7 +117,7 @@ Requires(post,preun,postun):	systemd-units >= 38
 # (just it doesn't log kernel buffer into syslog)
 # Requires:	klogd
 Requires:	libestr >= 0.1.9
-Requires:	libfastjson >= 0.99.8
+Requires:	libfastjson >= 0.99.9
 Requires:	liblogging-stdlog >= 1.0.3
 Requires:	logrotate >= 3.2-3
 Requires:	psmisc >= 20.1
@@ -161,21 +177,23 @@ Group:		Daemons
 Requires:	%{name} = %{version}-%{release}
 
 %description http
-HTTP support modules for rsyslog: http function module, docker input
-module, clickhouse output module, elasticsearch output module, http
-output module and httpfs output module.
+HTTP support modules for rsyslog: http function module, docker and
+kubernetes input modules, clickhouse, elasticsearch, http, httpfs,
+AWS CloudWatch Logs, AWS Kinesis, Azure Monitor Logs and OpenTelemetry
+output modules.
 
 %description http -l pl.UTF-8
-Moduły obsługujące HTTP dla rsysloga: moduł funkcji http, moduł
-wejściowy docker, moduł wyjściowy clickhouse, moduł wyjściowy
-elasticsearch i moduł wyjściowy http i moduł wyjściowy httpfs.
+Moduły obsługujące HTTP dla rsysloga: moduł funkcji http, moduły
+wejściowe docker i kubernetes oraz moduły wyjściowe clickhouse,
+elasticsearch, http, httpfs, AWS CloudWatch Logs, AWS Kinesis, Azure
+Monitor Logs i OpenTelemetry.
 
 %package czmq
 Summary:	0MQ input/output support for rsyslog
 Summary(pl.UTF-8):	Obsługa wejścia/wyjścia 0MQ dla rsysloga
 Group:		Daemons
 Requires:	%{name} = %{version}-%{release}
-Requires:	czmq >= 3.0.2
+Requires:	czmq >= 4.0.0
 
 %description czmq
 0MQ input/output support for rsyslog.
@@ -260,7 +278,7 @@ Summary:	GuardTime KSI-LS12 signing support for rsyslog
 Summary(pl.UTF-8):	Obsługa podpisów GuardTime KSI-LS12 dl rsysloga
 Group:		Daemons
 Requires:	%{name} = %{version}-%{release}
-Requires:	libksi-devel >= 3.19.0
+Requires:	libksi >= 3.19.0
 
 %description ksi
 GuardTime KSI-LS12 signing support for rsyslog.
@@ -316,7 +334,7 @@ Summary:	AMQP1 output support for rsyslog
 Summary(pl.UTF-8):	Obsługa wyjścia AMQP1 do rsysloga
 Group:		Daemons
 Requires:	%{name} = %{version}-%{release}
-Requires:	qpid-proton-c >= 0.9
+Requires:	qpid-proton-c >= 0.13
 
 %description amqp
 This output plugin enables rsyslog to send messages to an AMQP 1.0
@@ -451,20 +469,44 @@ Ten moduł jest podobny do zwykłego przekaźnika UDP, ale pozwana na
 fałszowanie adresu nadawcy. Dodatkowo umożliwia wysyłanie
 naprzemiennie z pewnej liczby portów źródłowych.
 
+%package segqueue
+Summary:	Tool to inspect and repair rsyslog disk queue files
+Summary(pl.UTF-8):	Narzędzie do sprawdzania i naprawy plików kolejek dyskowych rsysloga
+Group:		Applications/System
+Requires:	python3-modules
+
+%description segqueue
+rsyslog-segqueue inspects, exports and repairs rsyslog segmentedDisk
+queue stores.
+
+%description segqueue -l pl.UTF-8
+rsyslog-segqueue sprawdza, eksportuje i naprawia magazyny kolejek
+segmentedDisk rsysloga.
+
 %prep
 %setup -q
 %patch -P0 -p1
+%patch -P1 -p1
+%patch -P2 -p1
+%patch -P3 -p1
+%patch -P4 -p1
+%patch -P5 -p1
+%patch -P6 -p1
+%patch -P7 -p1
 
 %{__mv} contrib/imczmq/README{,.imczmq}
 %{__mv} contrib/omczmq/README{,.omczmq}
 %{__mv} plugins/omelasticsearch/README{,.omelasticsearch}
 
+%{__sed} -i -e '1s,^#!/usr/bin/env python3$,#!%{__python3},' tools/rsyslog-segqueue
+
 %build
 %{__libtoolize}
 %{__aclocal} -I m4
 %{__autoconf}
 %{__autoheader}
 %{__automake}
+# lognorm turbo needs liblognorm >= 2.1.0 built with --enable-turbo
 %configure \
 	--disable-silent-rules \
 	%{?with_curl:--enable-clickhouse} \
@@ -473,22 +515,27 @@ naprzemiennie z pewnej liczby portów źródłowych.
 	%{!?with_curl:--disable-fmhttp} \
 	--enable-gnutls \
 	%{?with_gssapi:--enable-gssapi-krb5} \
+	--enable-imbeats \
 	--enable-imbatchreport \
 	--enable-imdiag \
 	%{?with_curl:--enable-imdocker} \
 	--enable-imfile \
+	--enable-imfifo \
 	%{?with_zeromq:--enable-imczmq} \
 	%{?with_openssl:--enable-imdtls} \
 	%{?with_redis:--enable-imhiredis} \
 	%{?with_systemd:--enable-imjournal} \
 	%{?with_kafka:--enable-imkafka} \
+	%{?with_curl:--enable-imkubernetes} \
 	--enable-improg \
 	--enable-impstats \
+	%{__enable_disable impstats_push impstats-push} \
 	--enable-imptcp \
 	--enable-imtuxedoulog \
 	%{?with_ksi:--enable-ksi-ls12} \
 	%{?with_dbi:--enable-libdbi} \
 	%{!?with_systemd:--disable-libsystemd} \
+	--enable-libyaml \
 	--enable-libzstd \
 	--enable-mail \
 	--enable-mmanon \
@@ -511,15 +558,18 @@ naprzemiennie z pewnej liczby portów źródłowych.
 	--enable-mmutf8fix \
 	%{?with_mysql:--enable-mysql} \
 	%{?with_amqp:--enable-omamqp1} \
+	%{?with_curl:--enable-omawslogshlc} \
+	%{?with_curl:--enable-omazuredce} \
 	%{?with_zeromq:--enable-omczmq} \
 	%{?with_openssl:--enable-omdtls} \
-	--enable-omfile-hardened \
 	%{?with_curl:--enable-omhttp} \
 	%{?with_curl:--enable-omhttpfs} \
 	%{?with_redis:--enable-omhiredis} \
 	%{?with_systemd:--enable-omjournal} \
 	%{?with_kafka:--enable-omkafka} \
+	%{__enable_disable curl omkinesis} \
 	%{?with_mongodb:--enable-ommongodb} \
+	%{?with_curl:--enable-omotel} \
 	--enable-omprog \
 	%{?with_rabbitmq:--enable-omrabbitmq} \
 	--enable-omruleset \
@@ -541,6 +591,7 @@ naprzemiennie z pewnej liczby portów źródłowych.
 	%{?with_relp:--enable-relp} \
 	%{?with_rfc3195:--enable-rfc3195} \
 	%{?with_snmp:--enable-snmp} \
+	%{?with_lognorm:--disable-turbo} \
 	--enable-unlimited-select \
 	--enable-usertools \
 	--with-systemdsystemunitdir=%{systemdunitdir}
@@ -625,7 +676,7 @@ fi
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog README.md
-%attr(755,root,root) %{_bindir}/logctl
+%{?with_mongodb:%attr(755,root,root) %{_bindir}/logctl}
 %attr(755,root,root) %{_bindir}/rscryutil
 %attr(755,root,root) %{_sbindir}/rsyslogd
 %dir %{_sysconfdir}/rsyslog.d
@@ -648,7 +699,9 @@ fi
 %dir %{_libdir}/rsyslog
 %attr(755,root,root) %{_libdir}/rsyslog/fmhash.so
 %attr(755,root,root) %{_libdir}/rsyslog/imbatchreport.so
+%attr(755,root,root) %{_libdir}/rsyslog/imbeats.so
 %attr(755,root,root) %{_libdir}/rsyslog/imdiag.so
+%attr(755,root,root) %{_libdir}/rsyslog/imfifo.so
 %attr(755,root,root) %{_libdir}/rsyslog/imfile.so
 %{?with_systemd:%attr(755,root,root) %{_libdir}/rsyslog/imjournal.so}
 %attr(755,root,root) %{_libdir}/rsyslog/imklog.so
@@ -682,7 +735,6 @@ fi
 %attr(755,root,root) %{_libdir}/rsyslog/mmsnmptrapd.so
 %attr(755,root,root) %{_libdir}/rsyslog/mmtaghostname.so
 %attr(755,root,root) %{_libdir}/rsyslog/mmutf8fix.so
-%attr(755,root,root) %{_libdir}/rsyslog/omfile-hardened.so
 %{?with_systemd:%attr(755,root,root) %{_libdir}/rsyslog/omjournal.so}
 %attr(755,root,root) %{_libdir}/rsyslog/ommail.so
 %attr(755,root,root) %{_libdir}/rsyslog/omprog.so
@@ -706,10 +758,15 @@ fi
 %doc plugins/omelasticsearch/README.omelasticsearch
 %attr(755,root,root) %{_libdir}/rsyslog/fmhttp.so
 %attr(755,root,root) %{_libdir}/rsyslog/imdocker.so
+%attr(755,root,root) %{_libdir}/rsyslog/imkubernetes.so
+%attr(755,root,root) %{_libdir}/rsyslog/omawslogshlc.so
+%attr(755,root,root) %{_libdir}/rsyslog/omazuredce.so
 %attr(755,root,root) %{_libdir}/rsyslog/omclickhouse.so
 %attr(755,root,root) %{_libdir}/rsyslog/omelasticsearch.so
 %attr(755,root,root) %{_libdir}/rsyslog/omhttp.so
 %attr(755,root,root) %{_libdir}/rsyslog/omhttpfs.so
+%attr(755,root,root) %{_libdir}/rsyslog/omkinesis.so
+%attr(755,root,root) %{_libdir}/rsyslog/omotel.so
 %endif
 
 %if %{with gssapi}
@@ -849,3 +906,7 @@ fi
 %files udpspoof
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/rsyslog/omudpspoof.so
+
+%files segqueue
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/rsyslog-segqueue
diff --git a/rsyslog-imdtls-session-hardening.patch b/rsyslog-imdtls-session-hardening.patch
new file mode 100644
index 0000000..664d737
--- /dev/null
+++ b/rsyslog-imdtls-session-hardening.patch
@@ -0,0 +1,276 @@
+# CVE-2026-129834, CVE-2026-129835, CVE-2026-129836 (GHSA-4chq-f2r9-5jp8); upstream 093dc83de 32c8f195e 477cbe42e c95a05037 4e599526c ae36932a6 bee5bc967 (code only)
+diff --git a/plugins/imdtls/imdtls.c b/plugins/imdtls/imdtls.c
+index 88b4537..6a5937c 100644
+--- a/plugins/imdtls/imdtls.c
++++ b/plugins/imdtls/imdtls.c
+@@ -35,6 +35,7 @@
+ #include <poll.h>
+ #include <assert.h>
+ #include <time.h>
++#include <limits.h>
+ 
+ // --- Include openssl headers as well
+ #include <openssl/ssl.h>
+@@ -98,6 +99,10 @@ struct dtlsClient_s {
+     SSL *sslClient; /* DTSL (SSL) Client */
+     time_t lastActivityTime; /* Last Activity Time */
+     int clientfd; /* ClientFD */
++    int peerVerified; /* post-handshake permitted-peer check completed */
++    long verifiedRenegotiations; /* handshake generation covered by peerVerified */
++    short pollEvents; /* readiness needed by the handshake */
++    int drainPending; /* continue after the per-client read limit */
+ };
+ 
+ // Use typedef to define a type 'dtlsClient_t' based on 'struct dtlsClient_s'
+@@ -572,6 +577,32 @@ static void DTLScleanupSession(instanceConf_t *inst, int idx) {
+     }
+     inst->dtlsClients[idx]->sslClient = NULL;
+     inst->dtlsClients[idx]->lastActivityTime = 0;
++    inst->dtlsClients[idx]->peerVerified = 0;
++    inst->dtlsClients[idx]->verifiedRenegotiations = 0;
++    inst->dtlsClients[idx]->pollEvents = POLLIN;
++    inst->dtlsClients[idx]->drainPending = 0;
++}
++
++static int DTLSVerifySession(instanceConf_t *inst, int idx) {
++    dtlsClient_t *client = inst->dtlsClients[idx];
++    if (!SSL_is_init_finished(client->sslClient)) {
++        client->peerVerified = 0;
++        return 0;
++    }
++    long renegotiations = SSL_total_renegotiations(client->sslClient);
++    if (client->peerVerified && client->verifiedRenegotiations == renegotiations) {
++        return 1;
++    }
++
++    if (imdtls_verify_callback(1, client->sslClient) == 0) {
++        LogMsg(0, RS_RET_NO_ERRCODE, LOG_WARNING, "imdtls: Cert Verify FAILED for DTLS client idx (%d)", idx);
++        DTLScleanupSession(inst, idx);
++        return 0;
++    }
++    client->peerVerified = 1;
++    client->verifiedRenegotiations = renegotiations;
++    DBGPRINTF("imdtls: Cert Verify SUCCESS for DTLS client idx (%d)\n", idx);
++    return 1;
+ }
+ 
+ static void DTLSAcceptSession(instanceConf_t *inst, int idx) {
+@@ -587,7 +618,7 @@ static void DTLSAcceptSession(instanceConf_t *inst, int idx) {
+         if (ret <= 0) {
+             err = SSL_get_error(ssl, ret);
+             if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) {
+-                // Non-blocking operation did not complete; retry later
++                inst->dtlsClients[idx]->pollEvents = (err == SSL_ERROR_WANT_WRITE) ? POLLIN | POLLOUT : POLLIN;
+                 DBGPRINTF("imdtls: SSL_accept didn't complete (%d). Will retry.\n", err);
+             } else if (err == SSL_ERROR_SYSCALL) {
+                 DBGPRINTF("imdtls: SSL_accept failed SSL_ERROR_SYSCALL idx (%d), removing client.\n", idx);
+@@ -602,18 +633,12 @@ static void DTLSAcceptSession(instanceConf_t *inst, int idx) {
+         } else {
+             DBGPRINTF("imdtls: SSL_accept success idx (%d), adding client.\n", idx);
+             inst->dtlsClients[idx]->lastActivityTime = time(NULL);
+-
+-            int status = 1;
+-            status = imdtls_verify_callback(status, ssl);
+-            if (status == 0) {
+-                LogMsg(0, RS_RET_NO_ERRCODE, LOG_WARNING, "imdtls: Cert Verify FAILED for DTLS client idx (%d)", idx);
+-                DTLScleanupSession(inst, idx);
+-            } else {
+-                DBGPRINTF("imdtls: Cert Verify SUCCESS for DTLS client idx (%d)\n", idx);
+-            }
++            inst->dtlsClients[idx]->pollEvents = POLLIN;
++            DTLSVerifySession(inst, idx);
+         }
+     } else {
+         DBGPRINTF("imdtls: SSL_get_state for DTLS client idx (%d) is %d\n", idx, ret);
++        DTLSVerifySession(inst, idx);
+     }
+ }
+ 
+@@ -630,26 +655,51 @@ static void DTLSReadClient(instanceConf_t *inst, int idx, short revents) {
+     int err;
+     SSL *ssl = inst->dtlsClients[idx]->sslClient;
+     DBGPRINTF("imdtls: DEBUG Check Client activity on index %d.\n", idx);
+-    if (revents & POLLIN) {
++    if (revents & (POLLERR | POLLHUP | POLLNVAL)) {
++        /* A queued socket error stays pending and makes poll() return
++         * immediately again. Reap the session instead of repolling it. */
++        DBGPRINTF("imdtls: socket error events 0x%x on index %d, removing client.\n", (unsigned)revents, idx);
++        DTLScleanupSession(inst, idx);
++        return;
++    }
++    if (revents & (POLLIN | POLLOUT)) {
+         if (ssl == NULL) {
+             DBGPRINTF("imdtls: DTLSHandleSessions MISSING SSL OBJ for index %d.\n", idx);
+             return;
+         }
++        if (!SSL_is_init_finished(ssl)) {
++            DTLSAcceptSession(inst, idx);
++            ssl = inst->dtlsClients[idx]->sslClient;
++            if (ssl == NULL || !SSL_is_init_finished(ssl)) {
++                return;
++            }
++        }
++        if (!DTLSVerifySession(inst, idx) || !(revents & inst->dtlsClients[idx]->pollEvents)) {
++            return;
++        }
+         DBGPRINTF("imdtls: Read Client activity on index %d.\n", idx);
+         char buf[MAX_DTLS_MSGSIZE];
+         int len = 0;
++        int reads = 0;
++        inst->dtlsClients[idx]->drainPending = 0;
+         do {
+             len = SSL_read(ssl, buf, sizeof(buf) - 1);
+             if (len > 0) {
++                inst->dtlsClients[idx]->pollEvents = POLLIN;
++                if (!DTLSVerifySession(inst, idx)) {
++                    return;
++                }
+                 buf[len] = '\0';
+                 processMsg(inst, inst->dtlsClients[idx], buf, len);
+             } else {
+                 err = SSL_get_error(ssl, len);
+                 if (err == SSL_ERROR_WANT_READ) {
++                    inst->dtlsClients[idx]->pollEvents = POLLIN;
+                     DBGPRINTF("imdtls: SSL_ERROR_WANT_READ flush rbio on index %d.\n", idx);
+                     BIO *rbio = SSL_get_rbio(ssl);
+                     BIO_flush(rbio);
+                 } else if (err == SSL_ERROR_WANT_WRITE) {
++                    inst->dtlsClients[idx]->pollEvents = POLLIN | POLLOUT;
+                     DBGPRINTF("imdtls: SSL_ERROR_WANT_WRITE flush wbio on index %d.\n", idx);
+                     BIO *wbio = SSL_get_wbio(ssl);
+                     BIO_flush(wbio);
+@@ -668,7 +718,15 @@ static void DTLSReadClient(instanceConf_t *inst, int idx, short revents) {
+                     break;
+                 }
+             }
+-        } while (len > 0);
++            ++reads;
++        } while (len > 0 && reads < 32);
++        /* OpenSSL can retain complete DTLS records after the datagram socket
++         * has been drained. Retry once on the next loop after the limit,
++         * even if poll reports no new socket data. A WANT_READ clears this
++         * flag, so an incomplete record cannot spin the event loop. */
++        if (len > 0 && reads == 32) {
++            inst->dtlsClients[idx]->drainPending = 1;
++        }
+     }
+ }
+ 
+@@ -678,6 +736,8 @@ static void DTLSHandleSessions(instanceConf_t *inst) {
+     int optval = 1;
+     int fdcount = 0;
+     int ret, err;
++    int pollTimeout = -1;
++    time_t now = time(NULL);
+     memset(clientIdxByPollSlot, -1, sizeof(clientIdxByPollSlot));
+     memset(fds, 0, sizeof(fds));
+     fds[0].fd = inst->sockfd;
+@@ -696,13 +756,36 @@ static void DTLSHandleSessions(instanceConf_t *inst) {
+             fdcount++;
+             DBGPRINTF("imdtls: DTLSHandleSessions handle client %d (%d)\n", fdcount, clientfd);
+             fds[fdcount].fd = clientfd;
+-            fds[fdcount].events = POLLIN;
++            fds[fdcount].events = inst->dtlsClients[i]->pollEvents;
+             clientIdxByPollSlot[fdcount] = i;
++            if (inst->dtlsClients[i]->drainPending) {
++                pollTimeout = 0;
++            }
++
++            /* A nonblocking DTLS handshake needs its retransmission timer
++             * serviced even if no socket becomes ready. */
++            if (!SSL_is_init_finished(inst->dtlsClients[i]->sslClient)) {
++                struct timeval tv;
++                if (DTLSv1_get_timeout(inst->dtlsClients[i]->sslClient, &tv)) {
++                    long long ms = (long long)tv.tv_sec * 1000 + (tv.tv_usec + 999) / 1000;
++                    int delay = ms > INT_MAX ? INT_MAX : (int)ms;
++                    if (pollTimeout < 0 || delay < pollTimeout) {
++                        pollTimeout = delay;
++                    }
++                }
++            }
++            long long idleSeconds =
++                (long long)inst->timeout - (long long)difftime(now, inst->dtlsClients[i]->lastActivityTime);
++            long long idleMs = idleSeconds <= 0 ? 0 : idleSeconds * 1000;
++            int idleDelay = idleMs > INT_MAX ? INT_MAX : (int)idleMs;
++            if (pollTimeout < 0 || idleDelay < pollTimeout) {
++                pollTimeout = idleDelay;
++            }
+         }
+     }
+ 
+     DBGPRINTF("imdtls: Waiting for poll (clients %d) ...\n", fdcount);
+-    ret = poll(fds, fdcount + 1, -1);
++    ret = poll(fds, fdcount + 1, pollTimeout);
+     if (glbl.GetGlobalInputTermState() == 1) {
+         DBGPRINTF("imdtls: DTLSHandleSessions Terminate State\n");
+         return; /* terminate input! */
+@@ -716,14 +799,25 @@ static void DTLSHandleSessions(instanceConf_t *inst) {
+     DBGPRINTF("imdtls: DTLSHandleSessions handle client sockets (%d) \n", fdcount);
+     for (int i = 1; i <= fdcount; ++i) {
+         if (clientIdxByPollSlot[i] >= 0) {
+-            DTLSReadClient(inst, clientIdxByPollSlot[i], fds[i].revents);
++            int idx = clientIdxByPollSlot[i];
++            short revents = fds[i].revents | (inst->dtlsClients[idx]->drainPending ? POLLIN : 0);
++            DTLSReadClient(inst, idx, revents);
+         }
+     }
+ 
+     // Check session timeouts
+     for (int i = 0; i < MAX_DTLS_CLIENTS; ++i) {
+         if (inst->dtlsClients[i]->sslClient != NULL) {
+-            if (difftime(time(NULL), inst->dtlsClients[i]->lastActivityTime) > inst->timeout) {
++            if (!SSL_is_init_finished(inst->dtlsClients[i]->sslClient)) {
++                struct timeval tv;
++                if (DTLSv1_get_timeout(inst->dtlsClients[i]->sslClient, &tv) && tv.tv_sec == 0 && tv.tv_usec == 0 &&
++                    DTLSv1_handle_timeout(inst->dtlsClients[i]->sslClient) < 0) {
++                    DBGPRINTF("imdtls: DTLS retransmission failed for client index %d.\n", i);
++                    DTLScleanupSession(inst, i);
++                    continue;
++                }
++            }
++            if (difftime(time(NULL), inst->dtlsClients[i]->lastActivityTime) >= inst->timeout) {
+                 DBGPRINTF("imdtls: Session timeout (%d) for client index %d.\n", i, inst->timeout);
+                 DTLScleanupSession(inst, i);
+                 continue;
+@@ -832,12 +926,25 @@ static void DTLSHandleSessions(instanceConf_t *inst) {
+                     int addedClient = 0;
+                     BIO_ctrl_set_connected(rbio, client_addr);
+                     DBGPRINTF("imdtls: BIO_connect succeeded.\n");
++                    /* BIO_connect can reset the socket's blocking mode. Set
++                     * O_NONBLOCK only after the BIO has been connected. */
++                    int flags = fcntl(clientfd, F_GETFL, 0);
++                    if (flags < 0 || fcntl(clientfd, F_SETFL, flags | O_NONBLOCK) < 0) {
++                        LogError(0, NO_ERRCODE, "imdtls: unable to make client socket non-blocking");
++                        close(clientfd);
++                        SSL_free(ssl);
++                        break;
++                    }
+ 
+                     // Add to DTLS Clients
+                     for (int i = 0; i < MAX_DTLS_CLIENTS; ++i) {
+                         if (inst->dtlsClients[i]->sslClient == NULL) {
+                             inst->dtlsClients[i]->sslClient = ssl;
+                             inst->dtlsClients[i]->lastActivityTime = time(NULL);
++                            inst->dtlsClients[i]->peerVerified = 0;
++                            inst->dtlsClients[i]->verifiedRenegotiations = 0;
++                            inst->dtlsClients[i]->pollEvents = POLLIN;
++                            inst->dtlsClients[i]->drainPending = 0;
+                             DBGPRINTF("imdtls: New Client added at idx %d.\n", i);
+                             DTLSAcceptSession(inst, i);
+                             addedClient = 1;
+@@ -857,10 +964,11 @@ static void DTLSHandleSessions(instanceConf_t *inst) {
+                 /* Retry on EAGAIN (recv timeout, no datagram) and on ret == 0
+                  * with an empty error queue (no usable handshake data yet). */
+                 if (err == SSL_ERROR_SYSCALL && (errno == EAGAIN || (ret == 0 && ERR_peek_error() == 0))) {
+-                    DBGPRINTF("imdtls: DTLSv1_listen RET %d (ERR %d / ERRNO %d), retry\n", ret, err, errno);
+-                    // Wait little and retry DTLSv1_listen
+-                    srSleep(0, 100000);
+-                    continue;
++                    DBGPRINTF("imdtls: DTLSv1_listen RET %d (ERR %d / ERRNO %d), defer\n", ret, err, errno);
++                    /* DTLSv1_listen is stateless across the cookie exchange.
++                     * Return to poll instead of waiting here for a second flight. */
++                    SSL_free(ssl);
++                    break;
+                 } else {
+                     DBGPRINTF("imdtls: DTLSv1_listen RET %d (ERR %d / ERRNO %d), abort\n", ret, err, errno);
+                     net_ossl.osslLastOpenSSLErrorMsg(NULL, err, ssl, LOG_WARNING, "DTLSHandleSessions",
diff --git a/rsyslog-imuxsock-hardening.patch b/rsyslog-imuxsock-hardening.patch
new file mode 100644
index 0000000..ece24ef
--- /dev/null
+++ b/rsyslog-imuxsock-hardening.patch
@@ -0,0 +1,267 @@
+# CVE-2026-129829, CVE-2026-129830, CVE-2026-129831, CVE-2026-129832, CVE-2026-129838; upstream c0e524c50 02c74f597 fc9a1e91d 4922c251b b78142961 3e55c09d6 (code only)
+diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c
+index 2a75cd8..2f1e9fc 100644
+--- a/plugins/imuxsock/imuxsock.c
++++ b/plugins/imuxsock/imuxsock.c
+@@ -782,10 +782,13 @@ static void fixPID(uchar *bufTAG, int *lenTag, struct ucred *cred) {
+ 
+     lenPID = snprintf(bufPID, sizeof(bufPID), "[%lu]:", (unsigned long)cred->pid);
+ 
+-    for (i = *lenTag; i >= 0 && bufTAG[i] != '['; --i) /*JUST SKIP*/
++    for (i = *lenTag - 1; i >= 0 && bufTAG[i] != '['; --i) /*JUST SKIP*/
+         ;
+ 
+-    if (i < 0) i = *lenTag - 1; /* go right at end of TAG, pid was not present (-1 for ':') */
++    if (i < 0) {
++        i = *lenTag;
++        if (i > 0 && bufTAG[i - 1] == ':') --i;
++    }
+ 
+     if (i + lenPID > CONF_TAG_MAXSIZE) return; /* do not touch, as things would break */
+ 
+@@ -866,29 +869,40 @@ finalize_it:
+  * It is assumed the output buffer is large enough. Returns the number of
+  * characters added.
+  */
+-static int copyescaped(uchar *dstbuf, uchar *inbuf, int inlen) {
++static size_t copyescaped(uchar *dstbuf, const uchar *inbuf, const int inlen) {
++    static const uchar hex[] = "0123456789abcdef";
+     int iDst, iSrc;
+ 
+     *dstbuf = '"';
+-    for (iDst = 1, iSrc = 0; iSrc < inlen; ++iDst, ++iSrc) {
++    for (iDst = 1, iSrc = 0; iSrc < inlen; ++iSrc) {
+         if (inbuf[iSrc] == '"' || inbuf[iSrc] == '\\') {
+             dstbuf[iDst++] = '\\';
++            dstbuf[iDst++] = inbuf[iSrc];
++        } else if (iscntrl((unsigned char)inbuf[iSrc])) {
++            dstbuf[iDst++] = '\\';
++            dstbuf[iDst++] = 'x';
++            dstbuf[iDst++] = hex[inbuf[iSrc] >> 4];
++            dstbuf[iDst++] = hex[inbuf[iSrc] & 0x0f];
++        } else {
++            dstbuf[iDst++] = inbuf[iSrc];
+         }
+-        dstbuf[iDst] = inbuf[iSrc];
+     }
+     dstbuf[iDst++] = '"';
+-    return iDst;
++    return (size_t)iDst;
+ }
+ 
+ 
+-static size_t escapedLen(uchar *inbuf, int inlen) {
++static size_t escapedLen(const uchar *inbuf, const int inlen) {
+     size_t len = 2; /* surrounding quotes */
+ 
+     for (int i = 0; i < inlen; ++i) {
+         if (inbuf[i] == '"' || inbuf[i] == '\\') {
++            len += 2;
++        } else if (iscntrl((unsigned char)inbuf[i])) {
++            len += 4; /* \xNN */
++        } else {
+             ++len;
+         }
+-        ++len;
+     }
+     return len;
+ }
+@@ -909,6 +923,68 @@ finalize_it:
+ }
+ 
+ 
++static rsRetVal ensureTrustedPropSpace(
++    uchar **const dst, size_t *const dstLen, uchar *const stackDst, const size_t used, const size_t extra) {
++    uchar *newDst;
++    size_t needed;
++    size_t newLen;
++    DEFiRet;
++
++    if (extra > (size_t)-1 - used) {
++        ABORT_FINALIZE(RS_RET_ERR);
++    }
++    needed = used + extra;
++    if (needed <= *dstLen) {
++        FINALIZE;
++    }
++
++    newLen = *dstLen;
++    while (newLen < needed) {
++        if (newLen > (size_t)-1 / 2) {
++            newLen = needed;
++        } else {
++            newLen *= 2;
++        }
++    }
++
++    if (*dst == stackDst) {
++        CHKmalloc(newDst = malloc(newLen));
++        memcpy(newDst, *dst, used);
++    } else {
++        CHKmalloc(newDst = realloc(*dst, newLen));
++    }
++    *dst = newDst;
++    *dstLen = newLen;
++
++finalize_it:
++    RETiRet;
++}
++
++
++static rsRetVal appendEscapedTrustedProp(uchar **const dst,
++                                         size_t *const dstLen,
++                                         uchar *const stackDst,
++                                         size_t *const offs,
++                                         const uchar *const name,
++                                         const size_t nameLen,
++                                         const uchar *const value,
++                                         const int valueLen) {
++    size_t escaped;
++    DEFiRet;
++
++    escaped = escapedLen(value, valueLen);
++    if (nameLen > (size_t)-1 - escaped || nameLen + escaped > (size_t)-1 - 2) {
++        ABORT_FINALIZE(RS_RET_ERR);
++    }
++    CHKiRet(ensureTrustedPropSpace(dst, dstLen, stackDst, *offs, nameLen + escaped + 2));
++    CHKiRet(appendTrustedProp(*dst, *dstLen, offs, name, nameLen));
++    *offs += copyescaped(*dst + *offs, value, valueLen);
++
++finalize_it:
++    RETiRet;
++}
++
++
+ /* submit received message to the queue engine
+  * We now parse the message according to expected format so that we
+  * can also mangle it if necessary.
+@@ -945,7 +1021,7 @@ static rsRetVal SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *
+     parse++;
+     pri = 0;
+     priDigitCount = 0;
+-    while (offs < lenMsg && isdigit(*parse)) {
++    while (offs < lenMsg && priDigitCount < 3 && isdigit(*parse)) {
+         pri = pri * 10 + *parse - '0';
+         ++parse;
+         ++offs;
+@@ -1021,22 +1097,17 @@ static rsRetVal SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *
+         } else {
+             uchar msgbuf[8192];
+             uchar *pmsgbuf = msgbuf;
+-            const size_t trustedPropBufLen = sizeof(propBuf) - 1;
+-            const size_t trustedPropMaxExtra = 3 + /* " @[" */
+-                                               96 + /* _PID/_UID/_GID tags plus maximum decimal values */
+-                                               7 + trustedPropBufLen + /* _COMM= */
+-                                               6 + trustedPropBufLen + /* _EXE= */
+-                                               10 + 2 + 2 * trustedPropBufLen + /* _CMDLINE= plus escaped value */
+-                                               2; /* closing bracket and NUL */
++            const size_t trustedPropFixedExtra = 3 + /* " @[" */
++                                                 96 + /* _PID/_UID/_GID tags plus maximum decimal values */
++                                                 2; /* closing bracket and NUL */
+             size_t msgbuf_size = sizeof(msgbuf);
+             size_t toffs; /* offset for trusted properties */
+-            size_t escaped;
+ 
+-            if ((size_t)lenRcv > (size_t)-1 - trustedPropMaxExtra) {
++            if ((size_t)lenRcv > (size_t)-1 - trustedPropFixedExtra) {
+                 ABORT_FINALIZE(RS_RET_ERR);
+             }
+-            if ((size_t)lenRcv + trustedPropMaxExtra > sizeof(msgbuf)) {
+-                msgbuf_size = (size_t)lenRcv + trustedPropMaxExtra;
++            if ((size_t)lenRcv + trustedPropFixedExtra > sizeof(msgbuf)) {
++                msgbuf_size = (size_t)lenRcv + trustedPropFixedExtra;
+                 CHKmalloc(pmsgbuf = malloc(msgbuf_size));
+             }
+ 
+@@ -1056,30 +1127,25 @@ static rsRetVal SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *
+             }
+ 
+             if (getTrustedProp(cred, "comm", propBuf, sizeof(propBuf), &lenProp) == RS_RET_OK) {
+-                if ((iRet = appendTrustedProp(pmsgbuf, msgbuf_size, &toffs, (uchar *)" _COMM=", 7)) != RS_RET_OK ||
+-                    (iRet = appendTrustedProp(pmsgbuf, msgbuf_size, &toffs, propBuf, (size_t)lenProp)) != RS_RET_OK) {
++                if ((iRet = appendEscapedTrustedProp(&pmsgbuf, &msgbuf_size, msgbuf, &toffs, (uchar *)" _COMM=", 7,
++                                                     propBuf, lenProp)) != RS_RET_OK) {
+                     if (pmsgbuf != msgbuf) free(pmsgbuf);
+                     FINALIZE;
+                 }
+             }
+             if (getTrustedExe(cred, propBuf, sizeof(propBuf), &lenProp) == RS_RET_OK) {
+-                if ((iRet = appendTrustedProp(pmsgbuf, msgbuf_size, &toffs, (uchar *)" _EXE=", 6)) != RS_RET_OK ||
+-                    (iRet = appendTrustedProp(pmsgbuf, msgbuf_size, &toffs, propBuf, (size_t)lenProp)) != RS_RET_OK) {
++                if ((iRet = appendEscapedTrustedProp(&pmsgbuf, &msgbuf_size, msgbuf, &toffs, (uchar *)" _EXE=", 6,
++                                                     propBuf, lenProp)) != RS_RET_OK) {
+                     if (pmsgbuf != msgbuf) free(pmsgbuf);
+                     FINALIZE;
+                 }
+             }
+             if (getTrustedProp(cred, "cmdline", propBuf, sizeof(propBuf), &lenProp) == RS_RET_OK) {
+-                if ((iRet = appendTrustedProp(pmsgbuf, msgbuf_size, &toffs, (uchar *)" _CMDLINE=", 10)) != RS_RET_OK) {
++                if ((iRet = appendEscapedTrustedProp(&pmsgbuf, &msgbuf_size, msgbuf, &toffs, (uchar *)" _CMDLINE=", 10,
++                                                     propBuf, lenProp)) != RS_RET_OK) {
+                     if (pmsgbuf != msgbuf) free(pmsgbuf);
+                     FINALIZE;
+                 }
+-                escaped = escapedLen(propBuf, lenProp);
+-                if (escaped > msgbuf_size || toffs > msgbuf_size - escaped) {
+-                    if (pmsgbuf != msgbuf) free(pmsgbuf);
+-                    ABORT_FINALIZE(RS_RET_ERR);
+-                }
+-                toffs += (size_t)copyescaped(pmsgbuf + toffs, propBuf, lenProp);
+             }
+ 
+             /* finalize string */
+@@ -1113,8 +1179,14 @@ static rsRetVal SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *
+          * seems to be different in practice, and this is why we now have choices...
+          * rgerhards, 2015-03-03
+          */
+-        parser.SanitizeMsg(pMsg);
+-        lenMsg = pMsg->iLenRawMsg - offs; /* SanitizeMsg() may have changed the size */
++        CHKiRet(parser.SanitizeMsg(pMsg));
++        /* Sanitizing may shorten the raw message. Never reuse a PRI cursor
++         * outside the current representation. */
++        if (offs >= pMsg->iLenRawMsg) {
++            pMsg->msgFlags |= NEEDS_PARSING;
++            goto submit;
++        }
++        lenMsg = pMsg->iLenRawMsg - offs;
+         parse = pMsg->pszRawMsg + offs;
+         msgSetPRI(pMsg, pri);
+         MsgSetAfterPRIOffs(pMsg, priValid ? offs + 1 : 0);
+@@ -1138,16 +1210,20 @@ static rsRetVal SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *
+                 }
+             }
+         } else { /* if we pulled the time from the system, we need to update the message text */
+-            uchar *tmpParse = parse; /* just to check correctness of TS */
+-            if (datetime.ParseTIMESTAMP3339(&dummyTS, &tmpParse, &lenMsg) == RS_RET_OK ||
+-                datetime.ParseTIMESTAMP3164(&dummyTS, &tmpParse, &lenMsg, NO_PARSE3164_TZSTRING,
++            uchar *tmpParse = parse;
++            int remaining = lenMsg;
++            if (datetime.ParseTIMESTAMP3339(&dummyTS, &tmpParse, &remaining) == RS_RET_OK ||
++                datetime.ParseTIMESTAMP3164(&dummyTS, &tmpParse, &remaining, NO_PARSE3164_TZSTRING,
+                                             NO_PERMIT_YEAR_AFTER_TIME) == RS_RET_OK) {
+-                /* We modify the message only if it contained a valid timestamp,
+-                otherwise we do not touch it at all. */
+-                datetime.formatTimestamp3164(&st, (char *)parse, 0);
+-                parse[15] = ' '; /* re-write \0 from fromatTimestamp3164 by SP */
+-                /* update "counters" to reflect processed timestamp */
+-                parse += 16;
++                /* The permissive parsers accept timestamps shorter than the fixed
++                 * replacement. Only overwrite bytes belonging to the timestamp,
++                 * and keep the parser's cursor paired with its remaining length. */
++                if (tmpParse - parse == 16) {
++                    datetime.formatTimestamp3164(&st, (char *)parse, 0);
++                    parse[15] = ' '; /* replace the formatter's terminating NUL */
++                }
++                parse = tmpParse;
++                lenMsg = remaining;
+             }
+         }
+ 
+@@ -1166,6 +1242,7 @@ static rsRetVal SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *
+         pMsg->msgFlags |= NEEDS_PARSING;
+     }
+ 
++submit:
+     MsgSetRcvFrom(pMsg, pLstn->hostName == NULL ? glbl.GetLocalHostNameProp() : pLstn->hostName);
+     CHKiRet(MsgSetRcvFromIP(pMsg, pLocalHostIP));
+     MsgSetRuleset(pMsg, pLstn->pRuleset);
diff --git a/rsyslog-json-escape-special.patch b/rsyslog-json-escape-special.patch
new file mode 100644
index 0000000..477117a
--- /dev/null
+++ b/rsyslog-json-escape-special.patch
@@ -0,0 +1,14 @@
+# CVE-2026-129839: option.json emits malformed JSON for all-special values; upstream 91985b651 (code only)
+diff --git a/runtime/template.c b/runtime/template.c
+index c9a8dea..04d33c1 100644
+--- a/runtime/template.c
++++ b/runtime/template.c
+@@ -1161,7 +1161,7 @@ rsRetVal doEscape(uchar **pp, rs_size_t *pLen, unsigned short *pbMustBeFreed, in
+     else if (mode == SQL_ESCAPE)
+         for (p = *pp; *p && *p != '\'' && *p != '\\'; ++p);
+     else if (mode == JSON_ESCAPE)
+-        for (p = *pp; *p && (*p == '"' || *p == '\\'); ++p);
++        for (p = *pp; *p && *p != '"' && *p != '\\'; ++p);
+     /* when we get out of the loop, we are either at the
+      * string terminator or the first character to escape */
+     if (p && *p == '\0') FINALIZE; /* nothing to do in this case! */
diff --git a/rsyslog-mmanon-embedded-ipv4.patch b/rsyslog-mmanon-embedded-ipv4.patch
new file mode 100644
index 0000000..af9822f
--- /dev/null
+++ b/rsyslog-mmanon-embedded-ipv4.patch
@@ -0,0 +1,25 @@
+# CVE-2026-129833: mmanon stack overflow on overlong IPv4-in-IPv6 groups; upstream 4d9c2e613 (code only)
+diff --git a/plugins/mmanon/mmanon.c b/plugins/mmanon/mmanon.c
+index 26e3ad4..e5b1d86 100644
+--- a/plugins/mmanon/mmanon.c
++++ b/plugins/mmanon/mmanon.c
+@@ -1756,7 +1756,7 @@ static int syntax_embedded(const uchar *const __restrict__ buf,
+ 
+     while (*nprocessed < buflen) {
+         numLen = isValidHexNum(buf + *nprocessed, buflen - *nprocessed, nprocessed, 1);
+-        if (numLen > 0) {  // found a valid num
++        if (numLen > 0 && numLen < 5) {  // found a valid IPv6 group
+             if ((ipParts == 6 && hadAbbrev) || ipParts > 6) {  // is 6 since the first part of
+                 // IPv4 will also result in a valid hexvalue
+                 isIP = 0;
+@@ -1929,7 +1929,9 @@ static void anonEmbedded(wrkrInstanceData_t *pWrkrData, uchar **msg, int *pLenMs
+ 
+     int syn = syntax_embedded(*msg + offset, *pLenMsg - offset, &iplen, &v4Start);
+     if (syn) {
+-        assert(iplen < sizeof(address));
++        if (iplen >= sizeof(address)) {
++            return;
++        }
+         getip(*msg + offset, iplen, address);
+         offset += iplen;
+         process_embedded(address, pWrkrData, v4Start);
diff --git a/rsyslog-omclickhouse-sql-escaping.patch b/rsyslog-omclickhouse-sql-escaping.patch
new file mode 100644
index 0000000..05113d3
--- /dev/null
+++ b/rsyslog-omclickhouse-sql-escaping.patch
@@ -0,0 +1,81 @@
+# CVE-2026-93404: omclickhouse SQL injection; upstream 762b6b068137dc9265aec6331caf3e9c50273eff, 931078d16f978d6888b9d87d120df04475c7e135 (code only)
+diff --git a/plugins/omclickhouse/omclickhouse.c b/plugins/omclickhouse/omclickhouse.c
+index a46adfc..f520e48 100644
+--- a/plugins/omclickhouse/omclickhouse.c
++++ b/plugins/omclickhouse/omclickhouse.c
+@@ -859,7 +859,7 @@ BEGINnewActInst
+     CODE_STD_STRING_REQUESTnewActInst(1);
+     CHKiRet(OMSRsetEntry(*ppOMSR, 0,
+                          (uchar *)strdup((pData->tplName == NULL) ? " StdClickHouseFmt" : (char *)pData->tplName),
+-                         OMSR_RQD_TPL_OPT_SQL));
++                         OMSR_RQD_TPL_OPT_SQL_BACKSLASH));
+ 
+     if (server != NULL) {
+         CHKiRet(computeBaseUrl((const char *)server, pData->port, pData->useHttps, pData));
+diff --git a/runtime/action.c b/runtime/action.c
+index 201991f..5a045f0 100644
+--- a/runtime/action.c
++++ b/runtime/action.c
+@@ -2701,6 +2701,20 @@ rsRetVal addAction(action_t **ppAction,
+                          "the SQL or stdSQL option in your template!\n");
+                 ABORT_FINALIZE(RS_RET_RQD_TPLOPT_MISSING);
+             }
++            if ((iTplOpts & OMSR_RQD_TPL_OPT_SQL_BACKSLASH) && (pAction->ppTpl[i]->optFormatEscape != SQL_ESCAPE)) {
++                errno = 0;
++                LogError(0, RS_RET_RQD_TPLOPT_MISSING,
++                         "Action disabled. To use this action, you have to specify "
++                         "the SQL option (option.sql=\"on\") in your template!\n");
++                ABORT_FINALIZE(RS_RET_RQD_TPLOPT_MISSING);
++            }
++            if ((iTplOpts & OMSR_RQD_TPL_OPT_SQL_BACKSLASH) &&
++                (pAction->ppTpl[i]->pStrgen != NULL || pAction->ppTpl[i]->bHaveSubtree)) {
++                errno = 0;
++                LogError(0, RS_RET_RQD_TPLOPT_MISSING,
++                         "Action disabled. Backslash-aware SQL escaping requires a string or list template!\n");
++                ABORT_FINALIZE(RS_RET_RQD_TPLOPT_MISSING);
++            }
+             tplNoteUse(pAction->ppTpl[i], iTplOpts & OMSR_TPL_AS_DYNAFILE);
+         }
+ 
+diff --git a/runtime/objomsr.c b/runtime/objomsr.c
+index 4e8ba02..5df7988 100644
+--- a/runtime/objomsr.c
++++ b/runtime/objomsr.c
+@@ -142,7 +142,8 @@ int OMSRgetEntry(omodStringRequest_t *pThis, int iEntry, uchar **ppTplName, int
+ rsRetVal OMSRgetSupportedTplOpts(unsigned long *pOpts) {
+     DEFiRet;
+     assert(pOpts != NULL);
+-    *pOpts = OMSR_RQD_TPL_OPT_SQL | OMSR_TPL_AS_ARRAY | OMSR_TPL_AS_MSG | OMSR_TPL_AS_JSON | OMSR_TPL_AS_DYNAFILE;
++    *pOpts = OMSR_RQD_TPL_OPT_SQL | OMSR_TPL_AS_ARRAY | OMSR_TPL_AS_MSG | OMSR_TPL_AS_JSON | OMSR_TPL_AS_DYNAFILE |
++             OMSR_RQD_TPL_OPT_SQL_BACKSLASH;
+     RETiRet;
+ }
+ 
+diff --git a/runtime/objomsr.h b/runtime/objomsr.h
+index bc4f565..0047bd3 100644
+--- a/runtime/objomsr.h
++++ b/runtime/objomsr.h
+@@ -35,7 +35,9 @@
+ #define OMSR_TPL_AS_JSON 8 /* introduced in 6.5.1, 2012-09-02 */
+ /** Template is used to render a dynamic file name. */
+ #define OMSR_TPL_AS_DYNAFILE 16
+-/* next option is 32, 64, ... */
++/** Template must use SQL_ESCAPE, which also escapes backslashes. */
++#define OMSR_RQD_TPL_OPT_SQL_BACKSLASH 32
++/* next option is 64, 128, ... */
+ 
+ struct omodStringRequest_s { /* strings requested by output module for doAction() */
+     int iNumEntries; /* number of array entries for data elements below */
+diff --git a/runtime/rsconf.c b/runtime/rsconf.c
+index 5853837..30a225b 100644
+--- a/runtime/rsconf.c
++++ b/runtime/rsconf.c
+@@ -253,7 +253,7 @@ static uchar template_FullJSONFmt[] =
+ static uchar template_StdClickHouseFmt[] =
+     "\"INSERT INTO rsyslog.SystemEvents (severity, facility, "
+     "timestamp, hostname, tag, message) VALUES (%syslogseverity%, %syslogfacility%, "
+-    "'%timereported:::date-unixtimestamp%', '%hostname%', '%syslogtag%', '%msg%')\",STDSQL";
++    "'%timereported:::date-unixtimestamp%', '%hostname%', '%syslogtag%', '%msg%')\",SQL";
+ static uchar template_StdOmSenderTrack_senderid[] =
+     "\"%fromhost-ip%\""; /* default template for omsendertrack "senderid" parameter*/
+ static uchar template_PerSourceKey[] = "\"%hostname%\""; /* default template for per-source ratelimiting */
diff --git a/rsyslog-omdtls-verify-peer.patch b/rsyslog-omdtls-verify-peer.patch
new file mode 100644
index 0000000..3744674
--- /dev/null
+++ b/rsyslog-omdtls-verify-peer.patch
@@ -0,0 +1,211 @@
+# CVE-2026-132145: verify DTLS server identity in name/fingerprint modes; upstream be4ff24ea (code only)
+diff --git a/plugins/omdtls/omdtls.c b/plugins/omdtls/omdtls.c
+index 5bc6453..ac9489c 100644
+--- a/plugins/omdtls/omdtls.c
++++ b/plugins/omdtls/omdtls.c
+@@ -31,6 +31,7 @@
+ #include <strings.h>
+ #include <assert.h>
+ #include <errno.h>
++#include <ctype.h>
+ #include <fcntl.h>
+ #include <pthread.h>
+ #include <sys/uio.h>
+@@ -39,6 +40,7 @@
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
++#include <arpa/inet.h>
+ #include <math.h>
+ #ifdef HAVE_SYS_STAT_H
+     #include <sys/stat.h>
+@@ -100,6 +102,8 @@ typedef struct _instanceData {
+ 
+     uchar *target;
+     uchar *port;
++    uchar *permittedPeer; /* expected server name or SHA-256 certificate pin */
++    unsigned char fingerprint[32];
+ 
+     uchar *tlscfgcmd; /* OpenSSL Config Command used to override any OpenSSL Settings */
+     int bHaveSess; /* True if DTLS session is established */
+@@ -149,13 +153,57 @@ static rsRetVal dtls_send(wrkrInstanceData_t *pWrkrData,
+                           const actWrkrIParams_t *__restrict__ const pParam,
+                           const int iMsg);
+ 
++/* A pin is a complete SHA-256 digest, never a string prefix. */
++static int parseSHA256Pin(const char *pin, unsigned char digest[32]) {
++    if (pin == NULL || strncasecmp(pin, "SHA256:", 7) != 0) return 0;
++    const char *hex = pin + 7;
++    if (strlen(hex) != 95) return 0;
++    for (size_t i = 0; i < 32; ++i) {
++        unsigned int byte;
++        if (i != 0 && hex[i * 3 - 1] != ':') return 0;
++        if (!isxdigit((unsigned char)hex[i * 3]) || !isxdigit((unsigned char)hex[i * 3 + 1])) return 0;
++        if (sscanf(hex + i * 3, "%2x", &byte) != 1) return 0;
++        digest[i] = (unsigned char)byte;
++    }
++    return 1;
++}
++
++static int verifyServerIdentity(const instanceData *pData, SSL *ssl) {
++    X509 *cert = SSL_get_peer_certificate(ssl);
++    int matched = 0;
++    if (cert == NULL) return 0;
++    if (SSL_get_verify_result(ssl) != X509_V_OK) goto done;
++
++    if (pData->pNetOssl->authMode == OSSL_AUTH_CERTNAME) {
++        const char *expected = (const char *)(pData->permittedPeer != NULL ? pData->permittedPeer : pData->target);
++        struct in_addr ipv4;
++        struct in6_addr ipv6;
++        if (inet_pton(AF_INET, expected, &ipv4) == 1 || inet_pton(AF_INET6, expected, &ipv6) == 1)
++            matched = X509_check_ip_asc(cert, expected, 0) == 1;
++        else
++            matched = X509_check_host(cert, expected, 0, 0, NULL) == 1;
++    } else if (pData->pNetOssl->authMode == OSSL_AUTH_CERTFINGERPRINT) {
++        unsigned char actual[EVP_MAX_MD_SIZE];
++        unsigned int length = 0;
++        matched = X509_digest(cert, EVP_sha256(), actual, &length) == 1 && length == sizeof(pData->fingerprint) &&
++                  CRYPTO_memcmp(actual, pData->fingerprint, sizeof(pData->fingerprint)) == 0;
++    } else {
++        matched = 1; /* certvalid checks only the trusted chain. */
++    }
++done:
++    X509_free(cert);
++    return matched;
++}
++
+ 
+ /* tables for interfacing with the v6 config system */
+ /* action (instance) parameters */
+ static struct cnfparamdescr actpdescr[] = {
+-    {"target", eCmdHdlrGetWord, 0},       {"port", eCmdHdlrGetWord, 0},      {"tls.authmode", eCmdHdlrString, 0},
+-    {"tls.cacert", eCmdHdlrString, 0},    {"tls.mycert", eCmdHdlrString, 0}, {"tls.myprivkey", eCmdHdlrString, 0},
+-    {"tls.tlscfgcmd", eCmdHdlrString, 0}, {"template", eCmdHdlrGetWord, 0},  {"statsname", eCmdHdlrGetWord, 0}};
++    {"target", eCmdHdlrGetWord, 0},       {"port", eCmdHdlrGetWord, 0},
++    {"tls.authmode", eCmdHdlrString, 0},  {"tls.cacert", eCmdHdlrString, 0},
++    {"tls.mycert", eCmdHdlrString, 0},    {"tls.myprivkey", eCmdHdlrString, 0},
++    {"tls.tlscfgcmd", eCmdHdlrString, 0}, {"tls.permittedpeer", eCmdHdlrString, 0},
++    {"template", eCmdHdlrGetWord, 0},     {"statsname", eCmdHdlrGetWord, 0}};
+ static struct cnfparamblk actpblk = {CNFPARAMBLK_VERSION, sizeof(actpdescr) / sizeof(struct cnfparamdescr), actpdescr};
+ 
+ /* module-global parameters */
+@@ -279,17 +327,10 @@ BEGINcreateInstance
+     pData->tplName = NULL;
+     pData->target = NULL;
+     pData->port = NULL;
++    pData->permittedPeer = NULL;
+     pData->tlscfgcmd = NULL;
+     pData->statsName = NULL;
+ 
+-    /* node created, let's add to config */
+-    if (loadModConf->tail == NULL) {
+-        loadModConf->tail = loadModConf->root = pData;
+-    } else {
+-        loadModConf->tail->next = pData;
+-        loadModConf->tail = pData;
+-    }
+-
+     // Construct pNetOssl helper
+     CHKiRet(net_ossl.Construct(&pData->pNetOssl));
+     pData->pNetOssl->authMode = OSSL_AUTH_CERTANON;
+@@ -327,6 +368,7 @@ BEGINfreeInstance
+     /* Free other mem */
+     free(pData->target);
+     free(pData->port);
++    free(pData->permittedPeer);
+     free(pData->tlscfgcmd);
+ 
+     free(pData->tplName);
+@@ -467,6 +509,8 @@ BEGINnewActInst
+             }
+         } else if (!strcmp(actpblk.descr[i].name, "tls.tlscfgcmd")) {
+             CHKmalloc(pData->tlscfgcmd = (uchar *)es_str2cstr(pvals[i].val.d.estr, NULL));
++        } else if (!strcmp(actpblk.descr[i].name, "tls.permittedpeer")) {
++            CHKmalloc(pData->permittedPeer = (uchar *)es_str2cstr(pvals[i].val.d.estr, NULL));
+         } else {
+             LogError(0, RS_RET_INTERNAL_ERROR, "omdtls: program error, non-handled param '%s'\n",
+                      actpblk.descr[i].name);
+@@ -478,6 +522,19 @@ BEGINnewActInst
+         CHKmalloc(pData->port = (uchar *)strdup("443"));
+     }
+ 
++    if (pData->pNetOssl->authMode == OSSL_AUTH_CERTNAME &&
++        ((pData->permittedPeer != NULL && pData->permittedPeer[0] == '\0') ||
++         (pData->permittedPeer == NULL && (pData->target == NULL || pData->target[0] == '\0')))) {
++        LogError(0, RS_RET_PARAM_ERROR, "omdtls: name authentication requires a target or tls.permittedpeer");
++        ABORT_FINALIZE(RS_RET_PARAM_ERROR);
++    }
++    if (pData->pNetOssl->authMode == OSSL_AUTH_CERTFINGERPRINT &&
++        !parseSHA256Pin((const char *)pData->permittedPeer, pData->fingerprint)) {
++        LogError(0, RS_RET_PARAM_ERROR,
++                 "omdtls: fingerprint authentication requires a complete SHA256 tls.permittedpeer");
++        ABORT_FINALIZE(RS_RET_PARAM_ERROR);
++    }
++
+     iNumTpls = 1;
+     CODE_STD_STRING_REQUESTnewActInst(iNumTpls);
+ 
+@@ -499,6 +556,13 @@ BEGINnewActInst
+                                     &pData->ctrDtlsFail));
+         CHKiRet(statsobj.ConstructFinalize(pData->stats));
+     }
++    /* Publish only fully validated instances; the failure finalizer frees pData. */
++    if (loadModConf->tail == NULL) {
++        loadModConf->tail = loadModConf->root = pData;
++    } else {
++        loadModConf->tail->next = pData;
++        loadModConf->tail = pData;
++    }
+     CODE_STD_FINALIZERnewActInst;
+     cnfparamvalsDestruct(pvals, &actpblk);
+ ENDnewActInst
+@@ -661,6 +725,15 @@ static rsRetVal dtls_connect(wrkrInstanceData_t *pWrkrData) {
+         ABORT_FINALIZE(RS_RET_ERR);
+     }
+ 
++    if (pData->pNetOssl->authMode != OSSL_AUTH_CERTANON && !verifyServerIdentity(pData, pWrkrData->sslClient)) {
++        LogError(0, RS_RET_ERR, "omdtls: server certificate failed %s identity verification for %s:%s",
++                 pData->pNetOssl->authMode == OSSL_AUTH_CERTFINGERPRINT ? "fingerprint"
++                 : pData->pNetOssl->authMode == OSSL_AUTH_CERTNAME      ? "name"
++                                                                        : "chain",
++                 pData->target, pData->port);
++        ABORT_FINALIZE(RS_RET_ERR);
++    }
++
+     // Print Cipher info
+     sslCipher = SSL_get_current_cipher(pWrkrData->sslClient);
+     dbgprintf("dtls_connect[%p]: Cipher Version: %s Name: %s\n", pWrkrData, SSL_CIPHER_get_version(sslCipher),
+@@ -698,7 +771,8 @@ static rsRetVal dtls_connect(wrkrInstanceData_t *pWrkrData) {
+ finalize_it:
+     DBGPRINTF("dtls_connect[%p]: Exit with %d for %s:%s\n", pWrkrData, iRet, pData->target, pData->port);
+     if (iRet != RS_RET_OK) {
+-        pWrkrData->ConnectState = DTLS_DISCONNECTED;
++        /* A rejected peer must not retain an established SSL object. */
++        dtls_close(pWrkrData);
+     }
+     RETiRet;
+ }
+@@ -787,9 +861,9 @@ static rsRetVal dtls_close(wrkrInstanceData_t *pWrkrData) {
+     DEFiRet;
+     int iErr;
+     instanceData *const pData = (instanceData *const)pWrkrData->pData;
+-    if (pWrkrData->ConnectState == DTLS_CONNECTED) {
++    if (pWrkrData->sslClient != NULL) {
+         DBGPRINTF("dtls_close[%p]: close session for %s:%s\n", pWrkrData, pData->target, pData->port);
+-        if (pWrkrData->sslClient != NULL && pWrkrData->ConnectState == DTLS_CONNECTED) {
++        if (pWrkrData->ConnectState == DTLS_CONNECTED) {
+             iErr = SSL_shutdown(pWrkrData->sslClient);
+             if (iErr <= 0) {
+                 /* Shutdown not finished, call SSL_read to do a bidirectional shutdown, see doc:
+@@ -800,9 +874,9 @@ static rsRetVal dtls_close(wrkrInstanceData_t *pWrkrData) {
+                 char rcvBuf[DTLS_MAX_RCVBUF];
+                 SSL_read(pWrkrData->sslClient, rcvBuf, DTLS_MAX_RCVBUF);
+             }
+-            SSL_free(pWrkrData->sslClient);
+-            pWrkrData->sslClient = NULL;
+         }
++        SSL_free(pWrkrData->sslClient);
++        pWrkrData->sslClient = NULL;
+     }
+ 
+     // Close Sockets
diff --git a/rsyslog-tirpc.patch b/rsyslog-tirpc.patch
index 5a54354..13967f5 100644
--- a/rsyslog-tirpc.patch
+++ b/rsyslog-tirpc.patch
@@ -1,16 +1,16 @@
---- rsyslog-8.2008.0/configure.ac.orig	2020-08-25 10:39:08.000000000 +0200
-+++ rsyslog-8.2008.0/configure.ac	2020-10-13 07:15:01.274384785 +0200
-@@ -93,6 +93,8 @@
+--- rsyslog-8.2610.0.orig/configure.ac
++++ rsyslog-8.2610.0/configure.ac
+@@ -91,6 +91,8 @@
  
- PKG_CHECK_MODULES([LIBFASTJSON], [libfastjson >= 0.99.8],,)
+ PKG_CHECK_MODULES([LIBFASTJSON], [libfastjson >= 0.99.9],,)
  
 +PKG_CHECK_MODULES([LIBTIRPC], [libtirpc])
 +
  AC_DEFINE_UNQUOTED([PLATFORM_ID], ["${host}"], [platform id for display purposes])
  # we don't mind if we don't have the lsb_release utility. But if we have, it's
  # nice to have the extra information.
---- rsyslog-8.2008.0/contrib/mmgrok/Makefile.am.orig	2020-03-30 11:33:29.000000000 +0200
-+++ rsyslog-8.2008.0/contrib/mmgrok/Makefile.am	2020-10-13 07:15:27.987573401 +0200
+--- rsyslog-8.2610.0.orig/contrib/mmgrok/Makefile.am
++++ rsyslog-8.2610.0/contrib/mmgrok/Makefile.am
 @@ -1,8 +1,8 @@
  pkglib_LTLIBRARIES = mmgrok.la
  
diff --git a/rsyslog-weekday-low-year.patch b/rsyslog-weekday-low-year.patch
new file mode 100644
index 0000000..d547b5d
--- /dev/null
+++ b/rsyslog-weekday-low-year.patch
@@ -0,0 +1,20 @@
+# CVE-2026-129837: OOB read on weekday of low-year timestamp; upstream 59c3657b0 (code only)
+diff --git a/runtime/datetime.c b/runtime/datetime.c
+index e3fd69c..f904d8a 100644
+--- a/runtime/datetime.c
++++ b/runtime/datetime.c
+@@ -1187,6 +1187,7 @@ int getWeekdayNbr(struct syslogTime *ts) {
+     }
+     wday = ((36525 * g) / 100) + ((306 * f) / 10) + ts->day - 621049;
+     wday %= 7;
++    if (wday < 0) wday += 7;
+     return wday;
+ }
+ 
+@@ -1387,4 +1388,4 @@ BEGINAbstractObjClassInit(datetime, 1, OBJ_IS_CORE_MODULE) /* class, version */
+ ENDObjClassInit(datetime)
+ 
+ /* vi:set ai:
+- */
+\ No newline at end of file
++ */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rsyslog.git/commitdiff/b659e28b7e6f210b95e211e672d866cf1cec5550



More information about the pld-cvs-commit mailing list