Bug 2521135 (CVE-2026-78002) - CVE-2026-78002 rsyslog: rsyslog: Denial of service via heap buffer overflow in RainerScript replace() function
Summary: CVE-2026-78002 rsyslog: rsyslog: Denial of service via heap buffer overflow i...
Keywords:
Status: NEW
Alias: CVE-2026-78002
Deadline: 2026-08-24
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2524995
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-08-21 19:43 UTC by OSIDB Bzimport
Modified: 2026-10-20 21:19 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2026:69540 0 None None None 2026-09-21 23:25:51 UTC
Red Hat Product Errata RHSA-2026:69541 0 None None None 2026-09-21 19:06:02 UTC
Red Hat Product Errata RHSA-2026:80817 0 None None None 2026-10-12 14:47:14 UTC
Red Hat Product Errata RHSA-2026:81321 0 None None None 2026-10-12 16:39:27 UTC
Red Hat Product Errata RHSA-2026:84576 0 None None None 2026-10-19 04:16:16 UTC
Red Hat Product Errata RHSA-2026:86124 0 None None None 2026-10-20 21:19:32 UTC

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


Note You need to log in before you can comment on or make changes to this bug.