CVE-2022-24903: Buffer overflow in TCP syslog server (receiver) components in rsyslog
A flaw was found in rsyslog's reception TCP modules. This flaw allows an attacker to craft a malicious message leading to a heap-based buffer overflow. This issue allows the attacker to corrupt or access data stored in memory, leading to a denial of service in the rsyslog or possible remote code execution.
Other sources
Modules for TCP syslog reception have a heap buffer overflow when octet-counted framing is used. The attacker can corrupt heap values leading for data integrity issues and availability impact. Remote code execution is unlikely to happen but not impossible.
— Red Hat
Rsyslog is a rocket-fast system for log processing. Modules for TCP syslog reception have a potential heap buffer overflow when octet-counted framing is used. This can result in a segfault or some other malfunction. As of our understanding, this vulnerability can not be used for remote code execution. But there may still be a slight chance for experts to do that. The bug 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 is over the maximum, This can be used to overrun the memory buffer. However, once the sequence of digits stop, no additional characters can be added to the buffer. In our opinion, this makes remote exploits impossible or at least highly complex. Octet-counted framing is one of two potential framing modes. It is relatively uncommon, but enabled by default on receivers. Modules imtcp, imptcp, imgssapi, and imhttp are used for regular syslog message reception. It is best practice not to directly expose them to the public. When this practice is followed, the risk is considerably lower. Module imdiag is a diagnostics module primarily intended for testbench runs. We do not expect it to be present on any production installation. Octet-counted framing is not very common. Usually, it needs to be specifically enabled at senders. If users do not need it, they can turn it off for the most important modules. This will mitigate the vulnerability.
rsyslog is vulnerable to a heap-based buffer overflow, caused by improper bounds checking by the TCP syslog server (receiver) components. By sending a specially-crafted request, a remote attacker could overflow a buffer and execute arbitrary code on the system.
— IBM
Affected Software
Remediation
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is CVE-2022-24903?
CVE-2022-24903 is a vulnerability in rsyslog that allows for a heap-based buffer overflow due to improper bounds checking by the TCP syslog reception module.
What is the severity of CVE-2022-24903?
CVE-2022-24903 has a severity value of 8.1, which is considered high.
Which software versions are affected by CVE-2022-24903?
The affected software versions include rsyslog 8.2204.1, rsyslog 5.8.10-12.el6_10.1, rsyslog7 7.4.10-7.el6_10.1, rsyslog 8.24.0-57.el7_9.3, rsyslog 8.2102.0-7.el8_6.1, rsyslog 8.37.0-13.el8_1.1, rsyslog 8.1911.0-3.el8_2.1, rsyslog 8.1911.0-7.el8_4.3, rsyslog 8.2102.0-101.el9_0.1, and redhat-virtualization-host 4.3.23-20220622.0.el7_9.
How can I fix CVE-2022-24903?
To fix CVE-2022-24903, users should update rsyslog to version 8.2204.1 or take the recommended remedies provided by the software vendor.
Where can I find more information about CVE-2022-24903?
More information about CVE-2022-24903 can be found on the CVE website (https://www.cve.org/CVERecord?id=CVE-2022-24903), NIST NVD (https://nvd.nist.gov/vuln/detail/CVE-2022-24903), the rsyslog GitHub security advisories (https://github.com/rsyslog/rsyslog/security/advisories/GHSA-ggw7-xr6h-mmr8), and Red Hat Bugzilla (https://bugzilla.redhat.com/show_bug.cgi?id=2081353) and Errata (https://access.redhat.com/errata/RHSA-2022:4808).