utils: mkdirall: fix handling of suid/sgid bits#4400
Merged
kolyshkin merged 4 commits intoopencontainers:mainfrom Sep 14, 2024
Merged
utils: mkdirall: fix handling of suid/sgid bits#4400kolyshkin merged 4 commits intoopencontainers:mainfrom
kolyshkin merged 4 commits intoopencontainers:mainfrom
Conversation
74139b6 to
85b09d6
Compare
We reintroduced this once already because it is quite easy to miss this subtle aspect of proc mounting. The recent migration to securejoin.MkdirAllInRoot could have also inadvertently reintroduced this (though it didn't). Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
14a5320 to
079ebc3
Compare
Member
Author
|
@lifubang Can you verify this fixes the |
Member
Has verified that it has indeed fixed the dind issue. Thanks. |
079ebc3 to
a93a25e
Compare
Member
Author
|
I've released a new version of filepath-securejoin, so this should be ready now. |
It turns out that the suid and sgid mode bits are silently ignored by Linux (though the sticky bit is honoured), and some users are requesting mode bits that are ignored. While returning an error (as securejoin does) makes some sense, this is a regression. Ref: cyphar/filepath-securejoin#23 Fixes: dd827f7 ("utils: switch to securejoin.MkdirAllHandle") Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This includes a fix for the handling of S_ISGID directories. Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
a93a25e to
d8844e2
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.
Draft until filepath-securejoin v0.3.2 is released.This fixes some minor issues with suid/sgid bits introduced by #4393.
/cc @lifubang
Fixes #4401
Signed-off-by: Aleksa Sarai cyphar@cyphar.com