Bugzilla – Bug 1199061
VUL-0: CVE-2022-24903: rsyslog: potential heap buffer overflow in modules for TCP syslog reception
Last modified: 2022-12-08 07:28:45 UTC
oss-security: Severity: High | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H This is a worst case rating. When syslog best practices are applied (no Internet access to rsyslog receivers) the severity is lower. Details below. Advisory: https://github.com/rsyslog/rsyslog/security/advisories/GHSA-ggw7-xr6h-mmr8#advisory-comment-72243 Advisory content: ### Impact Modules for TCP syslog reception have a heap buffer overflow when octet-counted framing is used. The attacker can corrupt heap values, leading to data integrity issues and availability impact. Remote code execution is unlikely to happen but not impossible. ### Affected modules * `imtcp` * `imptcp` * `imhttp` (contributed module) * `imgssapi` (long-term semi-contributed module) * `imdiag` ### Details 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. This can also be used to corrupt other heap buffers. 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. ### Patches The patch is available via commit ID [PUT HERE]. ### Workarounds 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. How to do this depends on the module: * For `imtcp`. `imptcp`, add `SupportOctetCountedFraming="off"` to the `input()` definition. Docs: https://www.rsyslog.com/doc/v8-stable/configuration/modules/imtcp.html, https://www.rsyslog.com/doc/v8-stable/configuration/modules/imptcp.html, https://www.rsyslog.com/doc/v8-stable/configuration/modules/imhttp.html * For `imgssapi`octet.-counted framing cannot be turned off. * For `imdiag` octect-counted framing cannot be turned off. However, `imdiag` should never be present on production systems. Note that while octet-counted framing can be disabled sending systems have to explicitly enable it, but by default receiving systems autodetect if it's in use. The 'normal' reason to enable it is if you are sending logs with embedded newlines. ### For more information If you have any questions or comments about this advisory: * Open an issue in [rsyslog repo](http://github.com/rsyslog) * Post to the [rsyslog mailing list](https://lists.adiscon.net/mailman/listinfo/rsyslog) Credits to Peter Agten for initially reporting the issue and working with us on the resolution. Rainer Gerhards
(In reply to Robert Frohl from comment #17) > oss-security: > > [..] > > ### Patches > The patch is available via commit ID [PUT HERE]. https://github.com/rsyslog/rsyslog/commit/89955b0bcb1ff105e1374aad7e0e993faa6a038f
for openSUSE Tumbleweed: https://build.opensuse.org/request/show/975635
This is an autogenerated message for OBS integration: This bug (1199061) was mentioned in https://build.opensuse.org/request/show/975639 Factory / rsyslog
SUSE-SU-2022:1583-1: An update that fixes one vulnerability is now available. Category: security (important) Bug References: 1199061 CVE References: CVE-2022-24903 JIRA References: Sources used: openSUSE Leap 15.3 (src): rsyslog-8.2106.0-150200.4.26.1 SUSE Manager Server 4.1 (src): rsyslog-8.2106.0-150200.4.26.1 SUSE Manager Retail Branch Server 4.1 (src): rsyslog-8.2106.0-150200.4.26.1 SUSE Manager Proxy 4.1 (src): rsyslog-8.2106.0-150200.4.26.1 SUSE Linux Enterprise Server for SAP 15-SP2 (src): rsyslog-8.2106.0-150200.4.26.1 SUSE Linux Enterprise Server 15-SP2-LTSS (src): rsyslog-8.2106.0-150200.4.26.1 SUSE Linux Enterprise Server 15-SP2-BCL (src): rsyslog-8.2106.0-150200.4.26.1 SUSE Linux Enterprise Realtime Extension 15-SP2 (src): rsyslog-8.2106.0-150200.4.26.1 SUSE Linux Enterprise Module for Server Applications 15-SP3 (src): rsyslog-8.2106.0-150200.4.26.1 SUSE Linux Enterprise Module for Basesystem 15-SP3 (src): rsyslog-8.2106.0-150200.4.26.1 SUSE Linux Enterprise High Performance Computing 15-SP2-LTSS (src): rsyslog-8.2106.0-150200.4.26.1 SUSE Linux Enterprise High Performance Computing 15-SP2-ESPOS (src): rsyslog-8.2106.0-150200.4.26.1 SUSE Enterprise Storage 7 (src): rsyslog-8.2106.0-150200.4.26.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
update was released, bug should be good to close. Reassigning to security-team to wrap it up.
SUSE-SU-2022:1817-1: An update that fixes one vulnerability is now available. Category: security (important) Bug References: 1199061 CVE References: CVE-2022-24903 JIRA References: Sources used: SUSE Linux Enterprise Server for SAP 15-SP1 (src): rsyslog-8.33.1-150000.3.37.1 SUSE Linux Enterprise Server for SAP 15 (src): rsyslog-8.33.1-150000.3.37.1 SUSE Linux Enterprise Server 15-SP1-LTSS (src): rsyslog-8.33.1-150000.3.37.1 SUSE Linux Enterprise Server 15-SP1-BCL (src): rsyslog-8.33.1-150000.3.37.1 SUSE Linux Enterprise Server 15-LTSS (src): rsyslog-8.33.1-150000.3.37.1 SUSE Linux Enterprise High Performance Computing 15-SP1-LTSS (src): rsyslog-8.33.1-150000.3.37.1 SUSE Linux Enterprise High Performance Computing 15-SP1-ESPOS (src): rsyslog-8.33.1-150000.3.37.1 SUSE Linux Enterprise High Performance Computing 15-LTSS (src): rsyslog-8.33.1-150000.3.37.1 SUSE Linux Enterprise High Performance Computing 15-ESPOS (src): rsyslog-8.33.1-150000.3.37.1 SUSE Enterprise Storage 6 (src): rsyslog-8.33.1-150000.3.37.1 SUSE CaaS Platform 4.0 (src): rsyslog-8.33.1-150000.3.37.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
SUSE-SU-2022:2314-1: An update that solves one vulnerability, contains one feature and has 11 fixes is now available. Category: security (important) Bug References: 1051798,1068678,1080238,1082318,1101642,1110456,1160414,1178288,1178490,1182653,1188039,1199061 CVE References: CVE-2022-24903 JIRA References: SLE-23304 Sources used: SUSE Linux Enterprise Server 12-SP5 (src): rsyslog-8.2106.0-8.5.2 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
SUSE-SU-2022:2331-1: An update that fixes one vulnerability is now available. Category: security (important) Bug References: 1199061 CVE References: CVE-2022-24903 JIRA References: Sources used: SUSE OpenStack Cloud Crowbar 9 (src): rsyslog-8.24.0-3.58.2 SUSE OpenStack Cloud Crowbar 8 (src): rsyslog-8.24.0-3.58.2 SUSE OpenStack Cloud 9 (src): rsyslog-8.24.0-3.58.2 SUSE OpenStack Cloud 8 (src): rsyslog-8.24.0-3.58.2 SUSE Linux Enterprise Server for SAP 12-SP4 (src): rsyslog-8.24.0-3.58.2 SUSE Linux Enterprise Server for SAP 12-SP3 (src): rsyslog-8.24.0-3.58.2 SUSE Linux Enterprise Server 12-SP4-LTSS (src): rsyslog-8.24.0-3.58.2 SUSE Linux Enterprise Server 12-SP3-LTSS (src): rsyslog-8.24.0-3.58.2 SUSE Linux Enterprise Server 12-SP3-BCL (src): rsyslog-8.24.0-3.58.2 HPE Helion Openstack 8 (src): rsyslog-8.24.0-3.58.2 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
SUSE-SU-2022:2333-1: An update that fixes one vulnerability is now available. Category: security (important) Bug References: 1199061 CVE References: CVE-2022-24903 JIRA References: Sources used: SUSE Linux Enterprise Server 12-SP2-BCL (src): rsyslog-8.4.0-18.16.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Fixed and released.