Repository navigation
fix(files): handle-based output publication with verification - #358
Merged
Merged
Conversation
…tput DE: GHSA-9vh5-2vch-2r68 (Linux/Unix): Temporärausgabe über Handles statt Namen – Dateien per linkat auf den offenen Deskriptor veröffentlicht, Ordner ohne Symlink-Folgen geöffnet (Eigentümer, 0700) und über /proc/self/fd beschrieben, Veröffentlichen ohne Ersetzen (renameat2 NOREPLACE) und Prüfung von Gerät/Inode danach; Aufräumen nur des eigenen Objekts. Auch Schlüssel- und Faktordateien. Windows folgt separat. EN: GHSA-9vh5-2vch-2r68 (Linux/Unix): temporary output via handles instead of names – files published via linkat on the open descriptor, directories opened without following symlinks (owner, 0700) and written via /proc/self/fd, publication without replacing (renameat2 NOREPLACE) and device/inode verification afterwards; cleanup only of our own object. Also key and factor files. Windows follows separately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DE: GHSA-9vh5-2vch-2r68: Race-Tests für Rückfall und Ordnerziel scharf, neue Tests für ausgetauschten Temporärordner (kein Schreiben außerhalb) und ausgetauschte Temporärdatei (nie fremder Inhalt). FILE_IO_RACES, FILE_FORMAT, CHANGELOG, Angriffsmatrix 1.9.0 (QA1-FS-008: Linux behoben, Windows und Quellen offen). EN: GHSA-9vh5-2vch-2r68: race tests for the fallback and directory target enforced, new tests for a swapped temporary directory (no writes outside) and a swapped temporary file (never foreign content). FILE_IO_RACES, FILE_FORMAT, CHANGELOG, attack matrix 1.9.0 (QA1-FS-008: fixed on Linux, Windows and sources open). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 341208f802
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
DE: Codex-Fund #358: Schlägt die Prüfung nach dem Verlinken fehl, wird unter dem Zielnamen nichts entfernt (Eintrag nicht nachweislich unserer). Windows-Clippy: Platzhalter ohne /proc mit unnecessary_wraps erlaubt, Unix-Hilfe gekennzeichnet. EN: Codex finding #358: if verification fails after linking, nothing under the target name is removed (entry not provably ours). Windows clippy: placeholders without /proc allow unnecessary_wraps, unix helper marked. Refs #338 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DE: Windows-Clippy: handle_path wird nur unter Linux gebraucht; Platzhalter entfernt, PathBuf nur unter Linux. EN: Windows clippy: handle_path is only needed on Linux; placeholder removed, PathBuf on Linux only. Refs #338 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
DE: #338 – Ausgaben über Handles statt Namen (Linux/Unix). Ein zugehöriges Security Advisory wird nach dem Merge zusammen mit beta.5 veröffentlicht.
src/fs_identity.rs: Identität (Gerät/Inode) des offenen Objekts,linkatauf den Deskriptor (/proc/self/fd/N),renameat2(RENAME_NOREPLACE)mit Rückfall, Prüfung nach dem Veröffentlichen.src/files/output_guard.rs: Temporärdatei behält ein zweites Handle; Temporärordner wird ohne Symlink-Folgen geöffnet (Eigentümer, 0700 geprüft) und unter Linux über/proc/self/fd/Nbeschrieben; Aufräumen nur des eigenen Objekts.fsutil::publish*veröffentlicht über das Handle und prüft danach; auch Schlüssel- (envelope/io.rs, inkl. Überschreiben) und Faktordateien.source_swapped_for_symlink_is_never_readbleibt bis PR 4 ignoriert.fs(gleiches Crate, keine neue Abhängigkeit), keinunsafe.stracegeprüft:linkat(…AT_SYMLINK_FOLLOW)undrenameat2(…RENAME_NOREPLACE)gelingen, keine Sandbox-Änderung nötig.EN: #338 – outputs via handles instead of names (Linux/Unix). A related security advisory is published with beta.5 after merging. Identity (device/inode) of the open object,
linkaton the descriptor,renameat2(RENAME_NOREPLACE)with fallback and verification after publishing; temporary directories opened without following symlinks (owner/0700 checked) and written via/proc/self/fd/N; cleanup only of our own object; also key and factor files. Race tests enforced, new swap tests. rustix featurefs, nounsafe. Locally: full suite green, clippy, limits; checked under the CLI sandbox withstrace. Windows unchanged, separate step follows.Refs #338
🤖 Generated with Claude Code