Bug 2521135 (CVE-2026-78002)

Summary: CVE-2026-78002 rsyslog: rsyslog: Denial of service via heap buffer overflow in RainerScript replace() function
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: rhel-process-autobot, security-response-team, watson-tool-maintainers
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in rsyslog. An unauthenticated remote attacker can trigger a heap buffer overflow in the RainerScript `replace()` function by sending specially crafted syslog messages. This vulnerability arises from an incorrect buffer size calculation during string replacement, causing memory corruption. Successful exploitation can lead to a denial of service (DoS) for the affected system.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2524995    
Bug Blocks:    
Deadline: 2026-08-24   

Description OSIDB Bzimport 2026-08-21 19:43:38 UTC
doFuncReplace() in grammar/rainerscript.c implements replace(source, find, replaceWith) as two passes over the source string: pass 1 computes the output length, pass 2 allocates that many bytes with
es_newStr() and fills them. On partial-match failure the two passes rewind by different amounts — pass 1 does i -= (j - 1), pass 2 does i -= j — so pass 1 resumes scanning at matchStart + 2 while pass 2 resumes at matchStart + 1. Every match that begins one byte after a failed partial match is therefore counted by pass 2 but not by pass 1. When replaceWith is longer than find, each such match makes the allocation short by lReplaceWith - lfind bytes, and pass 2 writes past the end of the buffer. Neither store site is bounds-checked. The source string is normally a message property ($msg, $rawmsg, …), so an unauthenticated remote syslog sender chooses the number of missed matches and thus the size of the overflow.

Comment 2 Jon Orris 2026-09-21 19:06:01 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10

Via RHSA-2026:69541 https://access.redhat.com/errata/RHSA-2026:69541

Comment 3 Jon Orris 2026-09-21 23:25:50 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2026:69540 https://access.redhat.com/errata/RHSA-2026:69540

Comment 4 Jon Orris 2026-10-12 14:47:13 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2026:80817 https://access.redhat.com/errata/RHSA-2026:80817

Comment 5 Jon Orris 2026-10-12 16:39:26 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10.0 Extended Update Support

Via RHSA-2026:81321 https://access.redhat.com/errata/RHSA-2026:81321

Comment 6 Jon Orris 2026-10-19 04:16:15 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.6 Extended Update Support

Via RHSA-2026:84576 https://access.redhat.com/errata/RHSA-2026:84576

Comment 7 Jon Orris 2026-10-20 21:19:31 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions

Via RHSA-2026:86124 https://access.redhat.com/errata/RHSA-2026:86124

Comment 8 Jon Orris 2026-10-21 20:53:54 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions
  Red Hat Enterprise Linux 8.8 Telecommunications Update Service

Via RHSA-2026:87408 https://access.redhat.com/errata/RHSA-2026:87408

Comment 9 Jon Orris 2026-10-26 15:42:38 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.4 Update Services for SAP Solutions

Via RHSA-2026:90349 https://access.redhat.com/errata/RHSA-2026:90349

Comment 10 Jon Orris 2026-10-28 06:50:35 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On

Via RHSA-2026:91582 https://access.redhat.com/errata/RHSA-2026:91582

Comment 11 Jon Orris 2026-11-05 14:23:58 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On

Via RHSA-2026:95573 https://access.redhat.com/errata/RHSA-2026:95573

Comment 12 errata-xmlrpc 2026-11-09 02:48:34 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7 Extended Lifecycle Support

Via RHSA-2026:96085 https://access.redhat.com/errata/RHSA-2026:96085

Comment 13 errata-xmlrpc 2026-11-11 11:19:10 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10

Via RHSA-2026:98558 https://access.redhat.com/errata/RHSA-2026:98558

Comment 14 errata-xmlrpc 2026-11-11 11:51:20 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2026:98456 https://access.redhat.com/errata/RHSA-2026:98456