Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

genpolicy: reject some of the CopyFile requests #136

Merged
merged 2 commits into from
Dec 22, 2023

Conversation

danmihai1
Copy link

Implement additional verification of the target file path.

Copy link

@Sumynwa Sumynwa left a comment

Choose a reason for hiding this comment

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

The changes are good since we
(a)reject ' ../' & '/..' in the input.path
(b)replace 'cpath' with 'sfprefix' also tackles attempts to write into container rootfs mounts inside /run/kata-containers/shared/containers (even though they are read-only)

Additional verification of the target file path.

Signed-off-by: Dan Mihai <[email protected]>
Update sample files after the recent genpolicy changes.

Signed-off-by: Dan Mihai <[email protected]>
@danmihai1 danmihai1 merged commit 80b0055 into msft-main Dec 22, 2023
38 of 50 checks passed
@danmihai1 danmihai1 deleted the danmihai1/copy-file branch December 22, 2023 20:17
@sprt sprt added the upstream/missing PRs that are yet to be upstreamed label Jan 22, 2024
@Redent0r Redent0r added upstream/merged PRs that have been merged upstream and removed upstream/missing PRs that are yet to be upstreamed labels Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream/merged PRs that have been merged upstream
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants