Although parameters are usually set in parameter files, they can also be changed by nodes. Specifically, other nodes in the same ROS application can also change the parameters listed above before it’s used, either by accident or intentionally (i.e., by potential attackers). Since the joy_teleop_node handles joystick inputs, changes to the cmd_vel_topic, e_stop_pub_topic, and joy_topic parameters will directly affect the control of the robot. The robot will either ignore the control commands sent from the joystick, or ignore the e_stop commands. If there exists an attacker, she can even take over the robot by first fooling the joy_teleop_node to publish to a wrong velocity command topic e.g. joy/cmd_vel_fake, and forwarding messages from joy/cmd_vel_fake to joy/cmd_vel after changing the contents, or publishing any control commands to joy/cmd_vel as she wants. Because ROS is an OSS (open-source software) community, third-party nodes are widely used in ROS applications, usually without complete vetting of their behavior, which gives the opportunity to potentially malicious actors to inject malicious code (e.g, by submitting hypocrite commits like in other OSS systems [1]) to infiltrate the ROS applications that use it (or software supply chain attacks, one of the primary means for real-world attackers today [2]).
We understand that using parameters to set topic names brings flexibility. Still, for the purpose of security, we strongly suggest that you avoid such vulnerable programming patterns if possible. For example, to avoid the exposure of this specific vulnerability, you may consider alternatives like remapping, which is designed for configuring names when launching the nodes.
Hi there, I wanted to follow up on this security vulnerability. Could you please let me know if there have been any updates or concerns regarding this issue? Thanks
Hi,
We notice that you are using topic names from ROS parameters at the following locations: https://github.com/botsync/volta/blob/6815bce293b5f2b8149484df7c9c7b0fa004adcb/volta_teleoperator/src/joy_teleop_node.cpp#L55 https://github.com/botsync/volta/blob/6815bce293b5f2b8149484df7c9c7b0fa004adcb/volta_teleoperator/src/joy_teleop_node.cpp#L57 https://github.com/botsync/volta/blob/6815bce293b5f2b8149484df7c9c7b0fa004adcb/volta_teleoperator/src/joy_teleop_node.cpp#L61 For security reasons detailed below, we strongly suggest avoiding the usage of strings from parameters as topic names.
Although parameters are usually set in parameter files, they can also be changed by nodes. Specifically, other nodes in the same ROS application can also change the parameters listed above before it’s used, either by accident or intentionally (i.e., by potential attackers). Since the joy_teleop_node handles joystick inputs, changes to the
cmd_vel_topic
,e_stop_pub_topic
, andjoy_topic
parameters will directly affect the control of the robot. The robot will either ignore the control commands sent from the joystick, or ignore the e_stop commands. If there exists an attacker, she can even take over the robot by first fooling the joy_teleop_node to publish to a wrong velocity command topic e.g.joy/cmd_vel_fake
, and forwarding messages fromjoy/cmd_vel_fake
tojoy/cmd_vel
after changing the contents, or publishing any control commands tojoy/cmd_vel
as she wants. Because ROS is an OSS (open-source software) community, third-party nodes are widely used in ROS applications, usually without complete vetting of their behavior, which gives the opportunity to potentially malicious actors to inject malicious code (e.g, by submitting hypocrite commits like in other OSS systems [1]) to infiltrate the ROS applications that use it (or software supply chain attacks, one of the primary means for real-world attackers today [2]).We understand that using parameters to set topic names brings flexibility. Still, for the purpose of security, we strongly suggest that you avoid such vulnerable programming patterns if possible. For example, to avoid the exposure of this specific vulnerability, you may consider alternatives like remapping, which is designed for configuring names when launching the nodes.
[1] Q. Wu and K. Lu, “On the feasibility of stealthily introducing vulnerabilities in open-source software via hypocrite commits,” 2021, https://linuxreviews.org/images/d/d9/OpenSourceInsecurity.pdf. [2] Supply chain attacks are the hacker’s new favourite weapon. and the threat is getting bigger. https://www.zdnet.com/article/supply-chain-attacks-are-the-hackers-new-favourite-weapon-and-the-threat-is-getting-bigger/.