myxce/.wolf/bugs/bug-1508.md
Rongsong Shen 25d8a461fa
chore: gitea-sync refreshes 23 recent bug issues to the record format
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 03:44:30 +00:00

1.8 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-1508 fixed 2026-09-26 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). worker unknown 2026-08-08T00:00:00Z 2026-09-19T09:00:00Z 1
src/worker/src/xcecd_worker.c (handle_fetchfile
jobs-peek fetchfile feature)
security
path-traversal
fetchfile
worker
jobs-peek
needs-fix
7723a4f4
true 287 fixed 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