CVE-2023-51773
📋 TL;DR
This vulnerability in BACnet Stack allows attackers to read beyond allocated memory boundaries in the bacapp_decode_application_data function. It affects systems using BACnet Stack versions before 1.3.2 for building automation and industrial control systems. Attackers could potentially leak sensitive information or cause denial of service.
💻 Affected Systems
- BACnet Stack library
- Products using BACnet Stack library
📦 What is this software?
Bacnet Stack by Bacnetstack
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise and lateral movement within building automation networks
Likely Case
Information disclosure of adjacent memory contents, potentially revealing sensitive data or causing application crashes
If Mitigated
Limited information leakage with no system compromise if proper network segmentation and access controls are implemented
🎯 Exploit Status
Buffer over-read vulnerabilities can be leveraged for information disclosure but require specific conditions for code execution
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.3.2
Vendor Advisory: https://github.com/bacnet-stack/bacnet-stack/blob/master/CHANGELOG.md
Restart Required: Yes
Instructions:
1. Update BACnet Stack to version 1.3.2 or later. 2. Recompile any applications using the library. 3. Restart affected services. 4. Verify the fix by checking version and testing functionality.
🔧 Temporary Workarounds
Network Segmentation
allIsolate BACnet devices from untrusted networks and implement strict firewall rules
Access Control
allImplement strict authentication and authorization for BACnet services
🧯 If You Can't Patch
- Implement network segmentation to isolate BACnet devices from critical systems
- Deploy intrusion detection systems to monitor for anomalous BACnet traffic
🔍 How to Verify
Check if Vulnerable:
Check if BACnet Stack version is below 1.3.2 in applications or check with package managers
Check Version:
Check application documentation or use 'strings' command on binaries to find BACnet Stack version
Verify Fix Applied:
Verify BACnet Stack version is 1.3.2 or later and test application functionality
📡 Detection & Monitoring
Log Indicators:
- Application crashes
- Memory access violations
- Unusual BACnet traffic patterns
Network Indicators:
- Malformed BACnet packets
- Unusual BACnet port 47808 traffic
- Repeated connection attempts to BACnet services
SIEM Query:
source="bacnet" AND (event_type="crash" OR error="memory" OR error="buffer")
🔗 References
- https://github.com/bacnet-stack/bacnet-stack/blob/master/CHANGELOG.md
- https://github.com/bacnet-stack/bacnet-stack/compare/bacnet-stack-1.3.1...bacnet-stack-1.3.2
- https://github.com/bacnet-stack/bacnet-stack/pull/546
- https://github.com/bacnet-stack/bacnet-stack/pull/546/commits/c465412a076ca6c9ddf649612f2b4e1874d8dcb8
- https://sourceforge.net/p/bacnet/bugs/85/
- https://github.com/bacnet-stack/bacnet-stack/blob/master/CHANGELOG.md
- https://github.com/bacnet-stack/bacnet-stack/compare/bacnet-stack-1.3.1...bacnet-stack-1.3.2
- https://github.com/bacnet-stack/bacnet-stack/pull/546
- https://github.com/bacnet-stack/bacnet-stack/pull/546/commits/c465412a076ca6c9ddf649612f2b4e1874d8dcb8
- https://sourceforge.net/p/bacnet/bugs/85/