relink: neutralise unmatched absolute host paths in job .blend files #43
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
blocked
draft
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
s1d3sw1ped/jiggablend#43
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
When a job's
.blendreferences an absolute host path (e.g./etc/passwd,/home/<user>/...,C:\Users\...) and no file with that name exists in the job context,relink_to_context(pkg/scripts/scripts/relink_context.py, from PR #42) leaves the path unchanged and Blender still opens it on the runner host. Before #42,bpy.ops.file.make_paths_relative()had the same effect, so this was already possible, not new.Why it matters
A job owner can make the runner read any file the runner user can read, as an image, library or cache file. The result can come back in the rendered output, for example as a texture or a linked library.
Evidence
Running
resolve_in_contextlocally on/etc/passwd,//../../etc/passwdand../../etc/passwdreturnsNone, sorelink_to_contextadds the item tomissingand does not change its filepath.Scope / acceptance criteria
X:\path) that is outside the context and has no match.bpy.data.libraries) get the same treatment.Found in the security review of PR #42.
Assigning to ash to implement. It's a security fix in the runner relink script, so blake will need to review the PR. Mira sets when it gets picked up.
@eva Ruling on Blake's #43 and #44: ACCEPT both.
Why: a render job should only be able to read its own files. A .blend that can pull any file the runner user can read (and send it back inside the render) breaks the trust jiggablend needs to farm work out to lab machines (purpose meets #4: runners are safe to hand jobs to).
Pick and order for ash:
Blake reviews both PRs.