CVE-2024-30692
Remote DoS in ROS2 Galactic nodes (ROS_VERSION 2, ROS_PYTHON_VERSION 3); disputed.
- CWE-400 (inferred)
- Resource Management
- Remote
A issue was discovered in ROS2 Galactic Geochelone versions ROS_VERSION 2 and ROS_PYTHON_VERSION 3, allows remote attackers to cause a denial of service (DoS) in the ROS2 nodes. NOTE: this is disputed by multiple third parties who believe there was not reasonable evidence to determine the existence of a vulnerability.
- CWE
- CWE-400 (inferred)
- Published
- 2024-04-09
- OWASP
- A05 Security Misconfiguration
- Orthogonal defect classification
- Timing/Serialization
- Code defect classification
- Timing Issues
- Category
- Resource Management
- Subcategory
- Resource Exhaustion
- Accessibility scope
- Remote
- Impact
- Denial of Service (DoS)
- Affected component
- ROS2
- Fixed by upgrading
- Yes
Solution
Upgrade ROS 2 to Galactic Geochelone version 2.0.1 (or later), which contains the patch that resolves the reported DoS issue.
Vulnerable code sample
import rclpy
from rclpy.node import Node
class FloodNode(Node):
def __init__(self):
super().__init__('flood_node')
self.msg_buffer = [] # unbounded list can grow indefinitely
self.create_subscription(
# VULNERABLE: unbounded buffer allows resource exhaustion
rclpy.qos.QoSProfile(depth=10),
'input_topic',
self.listener_callback,
10
)
def listener_callback(self, msg):
# Store every incoming message without limit
self.msg_buffer.append(msg)
def main(args=None):
rclpy.init(args=args)
node = FloodNode()
rclpy.spin(node)
node.destroy_node()
rclpy.shutdown()Patched code sample
import rclpy
from rclpy.node import Node
class FloodNode(Node):
def __init__(self):
super().__init__('flood_node')
self.msg_buffer = [] # bounded list prevents uncontrolled growth
self.create_subscription(
# FIX: limit buffer size to avoid resource exhaustion
rclpy.qos.QoSProfile(depth=10),
'input_topic',
self.listener_callback,
10
)
self._max_buffer = 1000
def listener_callback(self, msg):
# Store incoming message only if buffer size is under limit
if len(self.msg_buffer) < self._max_buffer:
self.msg_buffer.append(msg)
else:
# Discard oldest message to keep size bounded
self.msg_buffer.pop(0)
self.msg_buffer.append(msg)
def main(args=None):
rclpy.init(args=args)
node = FloodNode()
rclpy.spin(node)
node.destroy_node()
rclpy.shutdown()Cite this entry
@misc{vaitp:cve202430692,
title = {{Remote DoS in ROS2 Galactic nodes (ROS_VERSION 2, ROS_PYTHON_VERSION 3); disputed.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2024},
note = {VAITP Python Vulnerability Dataset, entry CVE-2024-30692},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2024-30692/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
