CVE-2024-30676
DoS in ROS2 Iron Irwini (v2, Python3) allows remote node crash.
- CWE-400 (inferred)
- Resource Management
- Remote
A Denial-of-Service (DoS) vulnerability exists in ROS2 Iron Irwini versions where ROS_VERSION is 2 and ROS_PYTHON_VERSION is 3. A malicious user could potentially exploit this vulnerability remotely to crash the ROS2 nodes, thereby causing a denial of service. The flaw allows an attacker to cause unexpected behavior in the operation of ROS2 nodes, which leads to their failure and interrupts the regular operation of the system, thus making it unavailable for its intended users. 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
- Checking
- Code defect classification
- Missing Check
- Category
- Resource Management
- Subcategory
- Resource Exhaustion
- Accessibility scope
- Remote
- Impact
- Denial of Service (DoS)
- Affected component
- ROS2
Solution
Upgrade ROS 2 Iron Irwini to version 2.2.1 (or later), which contains the patch for this issue.
Vulnerable code sample
import rclpy
from rclpy.node import Node
from std_msgs.msg import String
class EchoNode(Node):
def __init__(self):
super().__init__('echo_node')
# VULNERABLE: unbounded subscription queue leading to memory exhaustion
self.sub = self.create_subscription(
String,
'chatter',
self.callback,
qos_profile=rclpy.qos.QoSProfile(depth=0) # unlimited queue
)
self.pub = self.create_publisher(String, 'echo', 10)
def callback(self, msg):
echo = String()
echo.data = msg.data
self.pub.publish(echo)
def main():
rclpy.init()
node = EchoNode()
rclpy.spin(node)
node.destroy_node()
rclpy.shutdown()Patched code sample
import rclpy
from rclpy.node import Node
from std_msgs.msg import String
class EchoNode(Node):
def __init__(self):
super().__init__('echo_node')
# FIX: bounded subscription queue to prevent memory exhaustion
self.sub = self.create_subscription(
String,
'chatter',
self.callback,
qos_profile=rclpy.qos.QoSProfile(depth=10) # limited queue
)
self.pub = self.create_publisher(String, 'echo', 10)
def callback(self, msg):
echo = String()
echo.data = msg.data
self.pub.publish(echo)
def main():
rclpy.init()
node = EchoNode()
rclpy.spin(node)
node.destroy_node()
rclpy.shutdown()Cite this entry
@misc{vaitp:cve202430676,
title = {{DoS in ROS2 Iron Irwini (v2, Python3) allows remote node crash.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2024},
note = {VAITP Python Vulnerability Dataset, entry CVE-2024-30676},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2024-30676/}}
}
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 ::
