🐛 fix(backup): confine member access - #1870
Merged
Merged
Conversation
Merging this PR will not alter performance
Comparing Footnotes
|
Hold the backup root as a directory capability and resolve each manifest member through descriptor-relative, no-follow opens. Verification and restore reject traversal and symlink swaps through the shared boundary. Closes #1181
The verifier can report a read error after opening `peryx.redb`. The test suite did not exercise that path. Run the verifier in a child process and replace the opened metadata descriptor with `/dev/null` opened for writes. The parent test harness retains its own descriptors.
gaborbernat
force-pushed
the
fix/backup-confinement-1181
branch
from
August 30, 2026 08:28
4b60f3f to
cff1861
Compare
Documentation build overview
35 files changed ·
|
This was referenced Aug 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backup manifests could direct verification and restore outside the selected backup directory through absolute paths, parent traversal, or symlinks. Untrusted backup contents could make these operations read external files. 🔒
The backup root now stays open as a directory capability, and descriptor-relative, no-follow operations resolve each manifest member. Verification and restore enforce the same path validation and filesystem boundary, including metadata inspection and the second open before staging.
Closes #1181