T09 · Insecure Skill Coding Practices
- Location
SKILL.md:104- Finding
Overbroad Process Termination Can Disrupt Unrelated ROS2 Workloads
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:104
Vulnerability Type: Overbroad process matching and termination
Risk Level: MediumVulnerable Code
bash pkill -f "ros2.*cam" ; pkill -f "ros2.*websocket" ; pkill -f "ros2.*codec"Technical Analysis
The documented shutdown command uses
pkill -f, which matches regular expressions against each process's complete command line. The expressionsros2.*cam,ros2.*websocket, andros2.*codecare broad and are not restricted by an exact executable name, ROS2 node identity, recorded process ID, or the user who launched the process.Consequently, the commands can match and terminate ROS2 camera, WebSocket, or codec processes that were not started by this skill. The semicolon-separated commands are also executed independently, so failure of one command does not prevent the remaining broad termination attempts.
Attack Path
- A device runs this skill's camera services alongside unrelated ROS2 camera, WebSocket, or codec workloads.
- An operator or agent follows the documented “stop all camera services” instruction.
pkill -fsearches every accessible process command line for each broad regular-expression match.- Matching processes receive the default termination signal, including unrelated workloads whose command lines happen to satisfy the patterns.
- Those services stop, causing availability loss until they are manually or automatically restarted.
This issue does not provide privilege escalation by itself. The affected scope is limited to processes the invoking account has permission to signal.
Impact Assessment
Exploitation can cause a local denial of service against unrelated ROS2 workloads. Potential effects include loss of camera capture, video encoding, browser preview, or other robotics functions associated with matching processes. The scope depends on the invoking user's process-signaling permissions; running the comm ...[truncated 97 chars]
- Remediation
View remediation
Remediation Suggestions
- Record the process IDs of services launched by the skill and terminate only those exact PIDs.
- Prefer ROS2 lifecycle management or explicit node shutdown mechanisms where supported.
- If process-name matching is unavoidable, constrain it by the invoking user and use exact, validated command-line patterns rather than broad expressions.
- Display and validate the candidate process list before sending termination signals.
- Use conditional chaining and verify each target so that one shutdown operation does not unintentionally broaden the affected scope.
- Avoid running the shutdown command with elevated privileges.
