42 lines
1.8 KiB
Markdown
42 lines
1.8 KiB
Markdown
---
|
|
id: "bug-1508"
|
|
status: "fixed"
|
|
status_updated: "2026-09-26"
|
|
status_note: "7723a4f4: worker fetchfile accepts only <dir>/job_<jobid>_task<N>.out for the request's jobid (exact match), O_NOFOLLOW|O_NONBLOCK, regular single-link file. Also closed the REST route (user out_file=/etc/shadow)."
|
|
component: "worker"
|
|
severity: "unknown"
|
|
timestamp: "2026-08-08T00:00:00Z"
|
|
last_seen: "2026-09-19T09:00:00Z"
|
|
occurrences: 1
|
|
files: ["src/worker/src/xcecd_worker.c (handle_fetchfile", "jobs-peek fetchfile feature)"]
|
|
tags: ["security", "path-traversal", "fetchfile", "worker", "jobs-peek", "needs-fix"]
|
|
related: []
|
|
fix_commits: ["7723a4f4"]
|
|
legacy: true
|
|
gitea_issue: 287
|
|
gitea_synced_status: "fixed"
|
|
gitea_synced_hash: "985b32eccef9"
|
|
---
|
|
|
|
# bug-1508: No user report / no test failure -- discovered incidentally during doc-cleanup fact-check audit of…
|
|
|
|
## Description
|
|
No user report / no test failure -- discovered incidentally during doc-cleanup fact-check audit of src/docs/job_peek.md against current code.
|
|
|
|
## Environment
|
|
_Not recorded (migrated from buglog.json)._
|
|
|
|
## Reproduction
|
|
_Not recorded (migrated from buglog.json)._
|
|
|
|
## Root cause
|
|
job_peek.md's design called for worker-side security validation on the fetchfile RPC (jobid ownership check, out/err-file path match against the job's actual output paths, path-traversal rejection) before Plan B (CGO/FetchFile) shipped. The validation was never implemented -- handle_fetchfile() opens whatever path it is given with no ownership or path-traversal check.
|
|
|
|
## Fix
|
|
NOT FIXED -- out of scope for the doc-cleanup task that found it. Flagged to user as a follow-up; needs its own security-reviewer pass on handle_fetchfile() (job ownership check + path-traversal rejection, matching the validation job_peek.md originally specified).
|
|
|
|
## Verification
|
|
_Not recorded (migrated from buglog.json)._
|
|
|
|
## References
|
|
- Gitea: #287
|