[CRITICAL] kill_others + process_filters can kill arbitrary system processes #21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The
kill_othersfeature combined withprocess_filtersallows a service to declare arbitrary process name patterns and kill all matching processes on the system.A misconfigured or malicious service with
process_filters = ["python"]orprocess_filters = ["node"]would kill ALL Python/Node.js processes on the system, including unrelated services.Impact
Files
crates/my_init_server/src/supervisor/spawning.rs--kill_others+process_filtershandling inspawn_servicecrates/my_init_server/src/process_info.rs--find_processes_by_nameSuggested Fix
kill_others(interactive prompt or admin flag)kill_othersto only services owned by the same userConfirmed by code inspection at crates/my_init_server/src/supervisor/spawning.rs:142-177. When kill_others is enabled with process_filters, the code calls find_processes_by_name for each filter and sends SIGKILL to all matching processes system-wide. There is no scope restriction, no user-owned-process check, no logging whitelist, and no confirmation prompt. A service with process_filters = ["python"] or ["node"] would kill every Python/Node.js process on the system, including unrelated critical services.