rsyslog: Fix CVE-2026-19654
PATCH 1/1 rsyslog: Fix CVE-2026-19654
From: Deepak Rathore <[email protected]>
This patch applies the fix backported to rsyslog 8.2402.0 for CVE-2026-19654. The upstream fix commit is referenced in [1], and the public CVE advisory is referenced in [2]. The regression-test commit is included in the same upstream pull request and referenced in [3] and the individual commit is reference in [4].
[1] https://github.com/rsyslog/rsyslog/commit/07b3c40a5a78c79ed9109251f842ca7e955dd586
[2] https://github.com/rsyslog/rsyslog/security/advisories/GHSA-cj5r-wh2m-7w29
[3] https://github.com/rsyslog/rsyslog/pull/7410
[4] https://github.com/rsyslog/rsyslog/commit/8e67ae69539153e4e80547dfb5f07ed17222e292
Signed-off-by Deepak Rathore <[email protected]>
--- .../rsyslog/rsyslog/CVE-2026-19654.patch | 51 +++++++++++++++++ .../rsyslog/CVE-2026-19654-regression.patch | 56 +++++++++++++++++++ .../rsyslog/rsyslog_8.2512.0.bb | 2 + 3 files changed, 109 insertions(+) create mode 100644 meta-oe/recipes-extended/rsyslog/rsyslog/CVE-2026-19654.patch create mode 100644 meta-oe/recipes-extended/rsyslog/rsyslog/CVE-2026-19654-regression.patch
meta-oe/recipes-extended/rsyslog/rsyslog/CVE-2026-19654.patch new file +51 -0
@@ -0,0 +1,51 @@ +From a680861018de25b2fb2e83d64c725ddbbb91a7db Mon Sep 17 00:00:00 2001 +From: Rainer Gerhards <[email protected]> +Date: Mon, 20 Jul 2026 17:19:28 +0200 +Subject: [PATCH 1/2] imptcp: guard regex framing match at line start + +Why +A regex match at the beginning of the receive buffer can form a +negative message length after oversize-frame recovery. + +Impact +Regex-framed imptcp listeners reject that invalid transition instead +of submitting a negative message length. + +Before/After +Before: a match with a zero line offset submitted an invalid length. +After: only a match following an existing line can submit a frame. + +Technical Overview +Mirror the line-offset guard used by the shared imtcp parser. +Leave existing regex framing and oversize recovery behavior unchanged. + +Security advisory: +https://github.com/rsyslog/rsyslog/security/advisories/GHSA-cj5r-wh2m-7w29 + +Reported-by: Raphael Eikenberg (@eikendev) +With the help of AI-Agents: Codex + +CVE: CVE-2026-19654 +Upstream-Status: Backport [https://github.com/rsyslog/rsyslog/commit/07b3c40a5a78c79ed9109251f842ca7e955dd586] + +(cherry picked from commit 07b3c40a5a78c79ed9109251f842ca7e955dd586) +Signed-off-by: Deepak Rathore <[email protected]> +--- + plugins/imptcp/imptcp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/imptcp/imptcp.c b/plugins/imptcp/imptcp.c +index 363d8fa5a..8470e93eb 100644 +--- a/plugins/imptcp/imptcp.c ++++ b/plugins/imptcp/imptcp.c +@@ -1009,7 +1009,7 @@ static rsRetVal ATTR_NONNULL() processDataRcvd_regexFraming(ptcpsess_t *const __ + pThis->iCurrLine = pThis->iMsg; + } else { + const int isMatch = !regexec(&inst->start_preg, (char *)pThis->pMsg + pThis->iCurrLine, 0, NULL, 0); +- if (isMatch) { ++ if (pThis->iCurrLine > 0 && isMatch) { + DBGPRINTF("regex match (%d), framing line: %s\n", pThis->iCurrLine, pThis->pMsg); + strcpy((char *)pThis->pMsg_save, (char *)pThis->pMsg + pThis->iCurrLine); + pThis->iMsg = pThis->iCurrLine - 1; +-- +2.53.0
meta-oe/recipes-extended/rsyslog/rsyslog/CVE-2026-19654-regression.patch new file +56 -0
56 lines not on this page · raw message
meta-oe/recipes-extended/rsyslog/rsyslog_8.2512.0.bb +2 -0
@@ -25,6 +25,8 @@ 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-19654.patch \ + file://CVE-2026-19654-regression.patch \ " SRC_URI:append:libc-musl = " \
Signature · 1 line
2.43.7