Skip to content

Fix TOCTOU race bug in tar extraction#12961

Merged
dmcgowan merged 1 commit intocontainerd:mainfrom
shachartal:main
Mar 4, 2026
Merged

Fix TOCTOU race bug in tar extraction#12961
dmcgowan merged 1 commit intocontainerd:mainfrom
shachartal:main

Conversation

@shachartal
Copy link
Copy Markdown
Contributor

Comment thread pkg/archive/tar_unix.go
}
// Only final created directory gets explicit permission
// call to avoid permission mask
return os.Chmod(path, perm)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part doesn't seem to need modification

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this change

@AkihiroSuda
Copy link
Copy Markdown
Member

TOCTOU

While it is true that TOCTOU may happen during open and chmod in general, it should be noted that a practical attack surface was not proved so far in the use case of containerd.

@samuelkarp
Copy link
Copy Markdown
Member

See [GHSA link]

These discussions are not publicly visible, but the gist is that we do not believe a practical attack exists here.

@AkihiroSuda
Copy link
Copy Markdown
Member

/cherry-pick release/2.2
/cherry-pick release/2.1
/cherry-pick release/1.7

@k8s-infra-cherrypick-robot
Copy link
Copy Markdown

@AkihiroSuda: once the present PR merges, I will cherry-pick it on top of release/1.7, release/2.1, release/2.2 in new PRs and assign them to you.

Details

In response to this:

/cherry-pick release/2.2
/cherry-pick release/2.1
/cherry-pick release/1.7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review Mar 3, 2026
@mxpv mxpv added this pull request to the merge queue Mar 3, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Mar 3, 2026
@dmcgowan dmcgowan added this pull request to the merge queue Mar 4, 2026
Merged via the queue into containerd:main with commit 857c278 Mar 4, 2026
93 of 94 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Mar 4, 2026
@k8s-infra-cherrypick-robot
Copy link
Copy Markdown

@AkihiroSuda: new pull request created: #12969

Details

In response to this:

/cherry-pick release/2.2
/cherry-pick release/2.1
/cherry-pick release/1.7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-infra-cherrypick-robot
Copy link
Copy Markdown

@AkihiroSuda: new pull request created: #12970

Details

In response to this:

/cherry-pick release/2.2
/cherry-pick release/2.1
/cherry-pick release/1.7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-infra-cherrypick-robot
Copy link
Copy Markdown

@AkihiroSuda: new pull request created: #12971

Details

In response to this:

/cherry-pick release/2.2
/cherry-pick release/2.1
/cherry-pick release/1.7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@chrishenzie
Copy link
Copy Markdown
Member

/cherry-pick release/2.0

@chrishenzie chrishenzie added cherry-picked/1.7.x PR commits are cherry-picked into release/1.7 branch cherry-pick/2.0.x Change to be cherry picked to release/2.0 branch cherry-picked/2.1.x PR commits are cherry picked into the release/2.1 branch cherry-picked/2.2.x PR commits are cherry-picked into release/2.2 branch labels Apr 14, 2026
@k8s-infra-cherrypick-robot
Copy link
Copy Markdown

@chrishenzie: new pull request created: #13237

Details

In response to this:

/cherry-pick release/2.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick/2.0.x Change to be cherry picked to release/2.0 branch cherry-picked/1.7.x PR commits are cherry-picked into release/1.7 branch cherry-picked/2.1.x PR commits are cherry picked into the release/2.1 branch cherry-picked/2.2.x PR commits are cherry-picked into release/2.2 branch kind/bug size/XS

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

9 participants