Skip to content

Conversation

@thaJeztah
Copy link
Member

Commit 3291d66 introduced a check for /proc and /sys, making sure the destination (dest) is a directory (and not e.g. a symlink).

Later, a hunk from commit 0ca91f4 switched from using filepath.Join to SecureJoin for dest. As SecureJoin follows and resolves symlinks, the check whether dest is a symlink no longer works.

To fix, do the check without/before using SecureJoin.

Add integration tests to make sure we won't regress.

(cherry picked from commit 0d72adf)

Commit 3291d66 introduced a check for /proc and /sys, making sure
the destination (dest) is a directory (and not e.g. a symlink).

Later, a hunk from commit 0ca91f4 switched from using filepath.Join
to SecureJoin for dest. As SecureJoin follows and resolves symlinks,
the check whether dest is a symlink no longer works.

To fix, do the check without/before using SecureJoin.

Add integration tests to make sure we won't regress.

Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit 0d72adf)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added this to the 1.1.5 milestone Mar 25, 2023
@thaJeztah thaJeztah added impact/changelog backport/1.1-pr A backport PR to release-1.1 labels Mar 25, 2023
@cyphar cyphar merged commit 059d773 into opencontainers:release-1.1 Mar 26, 2023
@thaJeztah thaJeztah deleted the 1.1_backport_no_symlinks branch March 26, 2023 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/1.1-pr A backport PR to release-1.1 impact/changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants