CVE-2022-24903

NameCVE-2022-24903
DescriptionRsyslog 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-3016-1, DSA-5150-1
Debian Bugs1010619

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
rsyslog (PTS)bullseye (security), bullseye8.2102.0-2+deb11u1fixed
bookworm8.2302.0-1fixed
sid, trixie8.2410.0-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
rsyslogsourcestretch8.24.0-1+deb9u2DLA-3016-1
rsyslogsourcebuster8.1901.0-1+deb10u2DSA-5150-1
rsyslogsourcebullseye8.2102.0-2+deb11u1DSA-5150-1
rsyslogsource(unstable)8.2204.1-11010619

Notes

https://www.openwall.com/lists/oss-security/2022/05/05/3
https://github.com/rsyslog/rsyslog/security/advisories/GHSA-ggw7-xr6h-mmr8#advisory-comment-72243
https://github.com/rsyslog/rsyslog/commit/89955b0bcb1ff105e1374aad7e0e993faa6a038f (v8.2204.1)
Introduced by (plugins/imptcp/imptcp.c): https://github.com/rsyslog/rsyslog/commit/0381a0de64a5a048c3d48b79055bd9848d0c7fc2 (v8.27.0, CVE-2018-16881)
Introduced by (runtime/tcps_sess.c): https://github.com/rsyslog/rsyslog/commit/01feb44bf1d091ec45ff425a096a0169f290da4b (v8.27.0)
Introduced by (contrib/imhttp/imhttp.c): https://github.com/rsyslog/rsyslog/commit/6102f6083cfa73fe4a91e3d34c4d1dc924465278 (v8.2010.0)

Search for package or bug name: Reporting problems