CVE-2024-34244

7.5 HIGH

📋 TL;DR

A buffer overflow vulnerability in libmodbus v3.1.10 allows attackers to cause crashes or potentially execute arbitrary code by sending specially crafted input to the modbus_write_bits function. This affects any system or application using this vulnerable version of the libmodbus library for Modbus communication.

💻 Affected Systems

Products:
  • libmodbus
Versions: v3.1.10 specifically
Operating Systems: All platforms running libmodbus
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using libmodbus v3.1.10 with modbus_write_bits function is vulnerable

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data theft, or disruption of industrial control systems

🟠

Likely Case

Denial of service through application crashes, potentially disrupting Modbus communications in industrial environments

🟢

If Mitigated

Limited impact with proper network segmentation and input validation in place

🌐 Internet-Facing: MEDIUM - While Modbus is typically internal, exposed systems could be targeted
🏢 Internal Only: HIGH - Industrial control systems using vulnerable libmodbus are at significant risk

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires sending specially crafted Modbus packets to vulnerable systems

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v3.1.11 or later

Vendor Advisory: https://github.com/stephane/libmodbus/issues/743

Restart Required: Yes

Instructions:

1. Download latest libmodbus from GitHub. 2. Compile and install new version. 3. Recompile any applications using libmodbus. 4. Restart affected services.

🔧 Temporary Workarounds

Network Segmentation

all

Isolate Modbus networks from untrusted networks

Input Validation

all

Implement strict input validation for Modbus packets

🧯 If You Can't Patch

  • Implement strict network access controls to limit Modbus traffic to trusted sources only
  • Deploy intrusion detection systems to monitor for anomalous Modbus traffic patterns

🔍 How to Verify

Check if Vulnerable:

Check libmodbus version: dpkg -l | grep libmodbus or rpm -qa | grep libmodbus

Check Version:

modbus --version or check library version in application

Verify Fix Applied:

Verify version is v3.1.11 or later and test modbus_write_bits with boundary values

📡 Detection & Monitoring

Log Indicators:

  • Application crashes, segmentation faults in libmodbus processes
  • Unusual Modbus write requests with abnormal data lengths

Network Indicators:

  • Modbus packets with unusually large data payloads to function code 15 (Write Multiple Coils)
  • Traffic patterns attempting to trigger buffer overflow conditions

SIEM Query:

source="modbus_traffic" AND (data_length>1000 OR function_code=15) | stats count by src_ip

🔗 References

📤 Share & Export