Repository navigation
Conversation
bbhtt
marked this pull request as draft
August 30, 2026 04:25
bbhtt
force-pushed
the
bbhtt/flatpak_cp_aat
branch
from
October 4, 2026 04:09
c5b1921 to
3425ceb
Compare
bbhtt
marked this pull request as ready for review
October 4, 2026 04:10
Member
|
Your commit contains no information of why this is done. I honestly don't see the value. Anyway I pushed a test case that this breaks. |
Collaborator
Author
|
This was part of the path traversal issues that keeps cropping up here and there and was pending investigation. There's some stuff in the draft advisories and we've been trying to switch to fd based operations to eliminate certain new issues. This function is originally from the Flatpak codebase who also switched to fd based variant recently in response to security issues. |
bbhtt
force-pushed
the
bbhtt/flatpak_cp_aat
branch
from
October 11, 2026 03:35
de1f1ba to
f9c655a
Compare
This use fds / fd-based APIs instead of paths / GFile based APIs to avoid potential TOCTTOU and path traversal issues. The function originally comes from Flatpak which also now uses a similar fd-based operation [1] [2]. This drops the MOVE and NO_CHOWN cp flags since they were either not used anywhere or were the default being used. [1]: flatpak/flatpak@c34e4cf [2]: flatpak/flatpak@6e94393
bbhtt
force-pushed
the
bbhtt/flatpak_cp_aat
branch
from
October 11, 2026 03:37
f9c655a to
46091a9
Compare
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.
This additionally drops the MOVE and NO_CHOWN cp flags since they were either not used anywhere or were the default being used.