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

Patch malicious tarballs directory traversal vuln #7057

Merged
merged 1 commit into from Nov 18, 2023

Conversation

chrisdoherty4
Copy link
Member

@chrisdoherty4 chrisdoherty4 commented Nov 17, 2023

Tarballs with files containing directory traversal components can write files to unintended locations. This change ensures the Untar function will error when a given tarball has a traversal component (..).

See https://cwe.mitre.org/data/definitions/22.html

Fixes https://github.com/aws/eks-anywhere/security/code-scanning/1

@chrisdoherty4 chrisdoherty4 changed the title Patch malicious tarballs Patch malicious tarballs directory traversal vuln Nov 17, 2023
@eks-distro-bot eks-distro-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 17, 2023
Copy link
Member

@g-gaston g-gaston left a comment

Choose a reason for hiding this comment

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

/lgtm

@eks-distro-bot eks-distro-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed lgtm size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 17, 2023
Copy link

codecov bot commented Nov 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (96f3aae) 71.34% compared to head (327c902) 71.35%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7057   +/-   ##
=======================================
  Coverage   71.34%   71.35%           
=======================================
  Files         544      544           
  Lines       41963    41966    +3     
=======================================
+ Hits        29940    29943    +3     
  Misses      10345    10345           
  Partials     1678     1678           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Tarballs with files containing directory traversal components can write
files to unintended locations. This change ensures the Untar function
will error when a given tarball has a traversal component (..).

See https://cwe.mitre.org/data/definitions/22.html
@chrisdoherty4
Copy link
Member Author

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrisdoherty4

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Member

@g-gaston g-gaston left a comment

Choose a reason for hiding this comment

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

/lgtm

@chrisdoherty4
Copy link
Member Author

/test eks-anywhere-e2e-presubmit

@chrisdoherty4 chrisdoherty4 merged commit 44d3582 into aws:main Nov 18, 2023
10 of 12 checks passed
@chrisdoherty4 chrisdoherty4 deleted the patch/malicious-tabralls branch November 18, 2023 21:03
@chrisdoherty4
Copy link
Member Author

/cherry-pick release-0.18

@eks-distro-pr-bot
Copy link
Contributor

@chrisdoherty4: new pull request created: #7077

In response to this:

/cherry-pick release-0.18

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants