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 datetime.c and tests/Makefile.am hunks against the
+ checksum-verified 8.2606.0 recipe source; security code is unchanged.
+- Adapt test registration to the 8.2606.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.
+- Omit the upstream EOF newline-only change; it is not needed for this fix.
+
+Signed-off-by: Virendrasinh Chauhan <cvirendr@cisco.com>
+---
+ runtime/datetime.c | 1 +
+ tests/Makefile.am | 4 ++++
+ tests/timereported-weekday-range.sh | 36 ++++++++++++++++++++++++++++++++++++
+ 3 files changed, 41 insertions(+)
+ create mode 100755 tests/timereported-weekday-range.sh
+
+diff --git a/runtime/datetime.c b/runtime/datetime.c
+index ab59ddcfd1af778fb2866c3ef30106dc96d1c072..655ad4bbbb32c80a01ba433db6c415a8a800553b 100644
+--- a/runtime/datetime.c
++++ b/runtime/datetime.c
+@@ -1185,6 +1185,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;
+ }
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 5c22eadabb59e90be6439335e1292417c585765d..abd5b22f05c470ac855c289bfd98e8a2094e8a7f 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 \
+@@ -15,6 +16,7 @@ EXTRA_DIST = \
+ unit/README.md
+
+ TESTS_JSON_OMITIFZERO = json-omitifzero.sh json-omitifzero-subtree.sh json-whitespace.sh
++EXTRA_DIST += $(TESTS_WEEKDAY_RANGE)
+ EXTRA_DIST += $(TESTS_JSON_OMITIFZERO)
+
+ TESTS_TEMPLATE_REGEX_BOUNDS = template-regex-index-bounds.sh
+@@ -502,6 +504,8 @@ TESTS_DEFAULT = \
+ parsertest-snare_ccoff_udp.sh \
+ parsertest-snare_ccoff_udp2.sh
+
++TESTS_DEFAULT += $(TESTS_WEEKDAY_RANGE)
++
+ TESTS_SKELETONS = \
+ omfwd-lb-1target-retry-test_skeleton.sh \
+ omfwd-lb-1target-retry-test_skeleton-TargetFail.sh
+diff --git a/tests/timereported-weekday-range.sh b/tests/timereported-weekday-range.sh
+new file mode 100755
+index 0000000000000000000000000000000000000000..c8a45efaa0d4898e8d83de458fd5973a0063ad32
+--- /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.2606.0.bb | 1 + 2 files changed, 110 insertions(+) create mode 100644 meta-oe/recipes-extended/rsyslog/rsyslog/CVE-2026-129837.patch