new file mode 100644
@@ -0,0 +1,109 @@
+From 59c3657b02ae81426220ec6dd504dff2b395ce6e Mon Sep 17 00:00:00 2001
+From: Rainer Gerhards <rgerhards@adiscon.com>
+Date: Sat, 14 Nov 2026 08:12:38 +0000
+Subject: [PATCH] Fix weekday formatting for low-year timestamps
+
+CVE: CVE-2026-129837
+Upstream-Status: Backport [https://github.com/rsyslog/rsyslog/commit/59c3657b02ae81426220ec6dd504dff2b395ce6e]
+
+Backport Changes:
+- Regenerate the source diffs against checksum-verified rsyslog-8.2610.0
+ source (SHA-256: 7bdf95e81ea6c0ee5d586342d57d2a6e395b089fb3c67318a0dc555816de404b); blob indexes match that source.
+- Adapt test registration to the 8.2610.0 TESTS_DEFAULT layout;
+ the regression test itself is unchanged.
+- Omit runtime/AGENTS.md, which contains upstream contributor
+ guidance and does not affect the fix or runtime behavior.
+- Preserve the target source file final newline; the upstream
+ newline-only change is not needed for this backport.
+
+Signed-off-by: Virendrasinh Chauhan <cvirendr@cisco.com>
+---
+ runtime/datetime.c | 1 +
+ tests/Makefile.am | 3 +++
+ tests/timereported-weekday-range.sh | 36 ++++++++++++++++++++++++++++++++++++
+ 3 files changed, 40 insertions(+)
+ create mode 100755 tests/timereported-weekday-range.sh
+
+diff --git a/runtime/datetime.c b/runtime/datetime.c
+index e3fd69c..8b6b285 100644
+--- a/runtime/datetime.c
++++ b/runtime/datetime.c
+@@ -1187,6 +1187,7 @@
+ }
+ wday = ((36525 * g) / 100) + ((306 * f) / 10) + ts->day - 621049;
+ wday %= 7;
++ if (wday < 0) wday += 7;
+ return wday;
+ }
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 43585f6..4426d58 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -1,4 +1,5 @@
+ TEST_EXTENSIONS=.sh
++TESTS_WEEKDAY_RANGE = timereported-weekday-range.sh
+ EXTRA_DIST = \
+ tabescape_dflt.sh \
+ tabescape_dflt-udp.sh \
+@@ -13,6 +14,7 @@
+ proprepltest-rfctag-udp.sh \
+ proprepltest-rfctag.sh \
+ unit/README.md
++EXTRA_DIST += $(TESTS_WEEKDAY_RANGE)
+
+ TESTS_DISK_QUEUE_SERIALIZER = diskqueue-serializer-abi.sh
+ EXTRA_DIST += $(TESTS_DISK_QUEUE_SERIALIZER)
+@@ -388,6 +390,7 @@
+ prop-programname.sh \
+ prop-programname-with-slashes.sh \
+ hostname-with-slash-pmrfc5424.sh \
++ $(TESTS_WEEKDAY_RANGE) \
+ hostname-with-slash-pmrfc3164.sh \
+ hostname-with-slash-dflt-invld.sh \
+ func-substring-invld-startpos.sh \
+diff --git a/tests/timereported-weekday-range.sh b/tests/timereported-weekday-range.sh
+new file mode 100755
+index 0000000..c8a45ef
+--- /dev/null
++++ b/tests/timereported-weekday-range.sh
+@@ -0,0 +1,36 @@
++#!/bin/bash
++# SPDX-License-Identifier: Apache-2.0
++# Regression for low-year RFC5424 timestamps reaching weekday formatters.
++# A negative C remainder previously indexed before wdayNames/one_digit and
++# could crash rsyslogd. Exact formatted output and processing of later valid
++# messages are the oracle.
++# shellcheck disable=SC1091,SC2086
++. ${srcdir:=.}/diag.sh init
++export NUMMESSAGES=6
++export QUEUE_EMPTY_CHECK_FUNC=wait_file_lines
++generate_conf
++add_conf '
++template(name="weekday" type="string"
++ string="%msg%:%timereported:::date-wdayname%/%timereported:::date-wday%\n")
++:msg, contains, "case:" action(type="omfile" template="weekday"
++ file="'$RSYSLOG_OUT_LOG'")
++'
++startup
++injectmsg_literal "<165>1 0001-01-02T00:00:00Z h a - - - case:low2"
++injectmsg_literal "<165>1 0001-01-06T00:00:00Z h a - - - case:low6"
++injectmsg_literal "<165>1 0001-01-07T00:00:00Z h a - - - case:low7"
++injectmsg_literal "<165>1 1970-01-01T00:00:00Z h a - - - case:epoch"
++injectmsg_literal "<165>1 2026-11-13T00:00:00Z h a - - - case:current"
++injectmsg_literal "<165>1 2024-02-29T00:00:00Z h a - - - case:leap"
++shutdown_when_empty
++wait_shutdown
++LC_ALL=C sort "$RSYSLOG_OUT_LOG" > "$RSYSLOG_DYNNAME.sorted"
++mv "$RSYSLOG_DYNNAME.sorted" "$RSYSLOG_OUT_LOG"
++export EXPECTED="case:current:Fri/5
++case:epoch:Thu/4
++case:leap:Thu/4
++case:low2:Mon/1
++case:low6:Fri/5
++case:low7:Sat/6"
++cmp_exact
++exit_test
+
+--
+2.39.5
@@ -25,6 +25,7 @@ SRC_URI = "https://www.rsyslog.com/files/download/rsyslog/${BPN}-${PV}.tar.gz \
file://run-ptest \
file://0001-tests-disable-the-check-for-inotify.patch \
file://0001-tests-tcpflood.c-Pass-correct-parameter-type-to-send.patch \
+ file://CVE-2026-129837.patch \
"
SRC_URI:append:libc-musl = " \
This patch applies the upstream fix as referenced in [2], using the commit shown in [1]. NVD details for this CVE are in [3]. [1] https://github.com/rsyslog/rsyslog/commit/59c3657b02ae81426220ec6dd504dff2b395ce6e [2] https://github.com/rsyslog/rsyslog/security/advisories/GHSA-5pc2-f2v7-5w5p [3] https://nvd.nist.gov/vuln/detail/CVE-2026-129837 Signed-off-by: Virendrasinh Chauhan <cvirendr@cisco.com> --- .../rsyslog/rsyslog/CVE-2026-129837.patch | 109 ++++++++++++++++++ .../rsyslog/rsyslog_8.2610.0.bb | 1 + 2 files changed, 110 insertions(+) create mode 100644 meta-oe/recipes-extended/rsyslog/rsyslog/CVE-2026-129837.patch