Heap Buffer Overflow in Rsyslog

rsyslog Updated 02 Oct 2025

Summary

06/05/2022
N/A
Yes i
High
8.1

CVE-2022-24903: Rsyslog is a rocket-fast system for log processing. Affects rsyslog across 2 version ranges.

< 8.2004.0-r2 < f211042ecbb472f9d8beb4678a65d272b6f07705

Fixed in 8.2004.0-r2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Rsyslog is a high-performance log processing system used for receiving, processing, and forwarding log messages. It provides modules for TCP syslog reception, including modules for regular syslog message reception and diagnostics. Octet-counted framing is a framing mode enabled by default on receivers, although it is relatively uncommon. This vulnerability affects the octet-counted framing mode in the modules imtcp, imptcp, imgssapi, and imhttp. The vulnerability allows for a potential heap buffer overflow when processing log messages with octet-counted framing.

Vulnerability Detail

The vulnerability occurs when the octet count is read. While there is a check for the maximum number of octets, digits are written to a heap buffer even when the octet count exceeds the maximum. This can lead to a heap buffer overflow, resulting in a segfault or other malfunctions. Although remote code execution is unlikely, there is a slight chance for experts to exploit the vulnerability. However, once the sequence of digits stops, no additional characters can be added to the buffer, making remote exploits highly complex or impossible. The risk is considerably lower if best practices are followed, such as not directly exposing the affected modules to the public and disabling octet-counted framing if not needed.

How To Fix

Minimum fixed version

8.2004.0-r2

This is the first release that contains the fix.

sudo apk add --upgrade rsyslog

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating the package is not immediately possible, users can mitigate the vulnerability by disabling octet-counted framing for the affected modules (imtcp, imptcp, imgssapi, and imhttp). This can be done by modifying the configuration file of Rsyslog and setting the appropriate configuration option to disable octet-counted framing. For example, in the configuration file /etc/rsyslog.conf, the following lines can be added:

module(load="imtcp")
input(type="imtcp" port="514" octet-counted-framing="off")

After making the changes, restart the Rsyslog service for the configuration to take effect.

Conclusion

The heap buffer overflow vulnerability in Rsyslog's octet-counted framing mode can lead to malfunctions or a segfault. While remote code execution is unlikely, it is recommended to update the affected package to a fixed version or disable octet-counted framing for the affected modules. Following best practices and keeping the software up to date can help mitigate the risk associated with this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for rsyslog →

Share this vulnerability

FAQ

Rsyslog is a high-performance log processing system used for receiving, processing, and forwarding log messages. It provides various modules for different log reception methods and supports advanced features for log management and analysis.

Octet-counted framing is a framing mode used in syslog message reception. It involves prefixing each syslog message with the number of octets in the message. This allows for more efficient parsing and processing of syslog messages.

The vulnerability occurs when processing log messages with octet-counted framing. When the octet count is read, digits are written to a heap buffer even when the count exceeds the maximum. This can lead to a heap buffer overflow, resulting in a segfault or other malfunctions.

While remote code execution is unlikely, there is a slight chance for experts to exploit the vulnerability. However, once the sequence of digits stops, no additional characters can be added to the buffer, making remote exploits highly complex or impossible.

The vulnerability can be mitigated by following best practices, such as not directly exposing the affected modules to the public and disabling octet-counted framing if not needed. Users can also update the affected package to a version that includes the fix.

Related vulnerabilities

Recent vulnerabilities recorded for rsyslog.

How To Fix

Minimum fixed version

8.2004.0-r2

This is the first release that contains the fix.

sudo apk add --upgrade rsyslog

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback