1.7 KiB
1.7 KiB
| id | status | status_updated | status_note | component | severity | timestamp | last_seen | occurrences | files | tags | related | fix_commits | legacy | gitea_issue | gitea_synced_status | gitea_synced_hash | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bug-1708 | fixed | 2026-09-28 | controller | unknown | 2026-08-26T09:32:18Z | 2026-09-19T09:00:00Z | 1 |
|
|
|
true | 303 | fixed | 3b44e52455e4 |
bug-1708: cmd_jobkill's -s <signo> is parsed via unchecked atoi(); a non-numeric value (e.g
Description
cmd_jobkill's -s <signo> is parsed via unchecked atoi(); a non-numeric value (e.g. a plausible typo of the symbolic name SIGKILL instead of 9) silently becomes signo=0 (POSIX null signal, delivers nothing), yet the command still prints "Job signaled" as if it succeeded.
Environment
Not recorded (migrated from buglog.json).
Reproduction
Not recorded (migrated from buglog.json).
Root cause
No validation that -s's argument is numeric/nonzero before using it and reporting success.
Fix
jobkill's -s is parsed with cmdutil_parse_long() and must be a signal number 1..NSIG-1; anything else is a usage error before any RPC.
Verification
- Test: test_jobkill_non_numeric_signal_rejected in src/harness/testsuite/test_test_cli.c: RED before the fix (-s SIGKILL accepted and sent), GREEN after; plus the parse_long cases in src/harness/testsuite/test_cmdutil.c
- Suites: harness 6/6 (asan): harness_unit_test 141/0, cmdutil 14/0, resval_typeresolve 7/0, joblist_display 22/0, join_worker_args 7/0, listrow_json 12/0
- Live: n/a; xce_test is a client tool and every case above runs without a controller
References
Not recorded (migrated from buglog.json).