CVE-2022-24903

8.1 HIGH

📋 TL;DR

Rsyslog's TCP syslog reception modules contain a heap buffer overflow vulnerability when octet-counted framing is used. This can cause segmentation faults or system malfunctions, with potential for remote code execution in expert hands. Systems running vulnerable Rsyslog versions with TCP reception modules exposed are affected.

💻 Affected Systems

Products:
  • Rsyslog
Versions: Versions prior to the fix commit f211042ecbb472f9d8beb4678a65d272b6f07705
Operating Systems: Linux distributions including Debian, Fedora, and others that package Rsyslog
Default Config Vulnerable: ⚠️ Yes
Notes: Modules imtcp, imptcp, imgssapi, and imhttp are vulnerable when using octet-counted framing. Module imdiag is also vulnerable but typically not present in production.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, though this is considered highly complex and unlikely according to the advisory.

🟠

Likely Case

Denial of service through segmentation faults or system crashes when processing malformed octet-counted syslog messages.

🟢

If Mitigated

Minimal impact if TCP reception modules are not exposed to untrusted networks and octet-counted framing is disabled.

🌐 Internet-Facing: MEDIUM - Risk exists if TCP reception modules are directly exposed to the internet, but octet-counted framing is relatively uncommon and remote exploitation is considered highly complex.
🏢 Internal Only: LOW - Internal systems following best practices (not exposing TCP reception modules to untrusted networks) face minimal risk.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: NO
Unauthenticated Exploit: ⚠️ Yes
Complexity: HIGH

The advisory states remote exploits are 'impossible or at least highly complex' due to buffer limitations once digit sequence stops. No public exploits have been reported.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions containing commit f211042ecbb472f9d8beb4678a65d272b6f07705

Vendor Advisory: https://github.com/rsyslog/rsyslog/security/advisories/GHSA-ggw7-xr6h-mmr8

Restart Required: Yes

Instructions:

1. Update Rsyslog to patched version via package manager. 2. For Debian: apt update && apt upgrade rsyslog. 3. For Fedora: dnf update rsyslog. 4. Restart Rsyslog service: systemctl restart rsyslog

🔧 Temporary Workarounds

Disable octet-counted framing

linux

Turn off octet-counted framing in vulnerable modules if not needed

Edit Rsyslog configuration to add: $InputTCPServerRun 10514 \n $InputTCPServerInputName imtcp \n $InputTCPServerOctetCountedFraming off

Restrict network exposure

linux

Ensure TCP reception modules are not exposed to untrusted networks

Configure firewall to restrict access to Rsyslog TCP ports (typically 514, 10514)
iptables -A INPUT -p tcp --dport 514 -s trusted_network -j ACCEPT
iptables -A INPUT -p tcp --dport 514 -j DROP

🧯 If You Can't Patch

  • Disable octet-counted framing in all TCP reception modules
  • Implement network segmentation to isolate Rsyslog servers from untrusted networks

🔍 How to Verify

Check if Vulnerable:

Check Rsyslog version and verify if it contains the vulnerable commit: rsyslogd -v | grep version

Check Version:

rsyslogd -v | grep version

Verify Fix Applied:

Verify version is updated and check configuration for octet-counted framing settings

📡 Detection & Monitoring

Log Indicators:

  • Segmentation fault errors in system logs
  • Rsyslog process crashes or restarts
  • Unusual octet-counted framing messages

Network Indicators:

  • Malformed TCP syslog packets with octet-counted framing
  • Connection attempts to Rsyslog TCP ports from untrusted sources

SIEM Query:

source="rsyslog" AND ("segmentation fault" OR "crash" OR "restart")

🔗 References

📤 Share & Export