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

Fix potential CVE in tarfile w/ symlink #2245

Merged
merged 1 commit into from
Mar 25, 2020

Conversation

TomSweeneyRedHat
Copy link
Member

Stealing @nalind 's workaround to avoid refetching
content after a file read failure. Under the right
circumstances that could be a symlink to a file meant
to overwrite a good file with bad data.

Testing:

# cat /tmp/dont_overwrite_me.txt
goodstuff

# python3 webserver.py &
[1] 14901

# buildah bud http://localhost:8000
127.0.0.1 - - [24/Mar/2020 20:15:50] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [24/Mar/2020 20:15:50] "GET / HTTP/1.1" 200 -
no FROM statement found

# cat /tmp/dont_overwrite_me.txt
goodstuff

Signed-off-by: TomSweeneyRedHat tsweeney@redhat.com

Stealing @nalind 's workaround to avoid refetching
content after a file read failure.  Under the right
circumstances that could be a symlink to a file meant
to overwrite a good file with bad data.

Testing:
```
goodstuff

[1] 14901

127.0.0.1 - - [24/Mar/2020 20:15:50] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [24/Mar/2020 20:15:50] "GET / HTTP/1.1" 200 -
no FROM statement found

goodstuff
```

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
@rhatdan
Copy link
Member

rhatdan commented Mar 25, 2020

LGTM

1 similar comment
@nalind
Copy link
Member

nalind commented Mar 25, 2020

LGTM

@rhatdan
Copy link
Member

rhatdan commented Mar 25, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Mar 25, 2020

Build succeeded

  • cirrus-ci/success

@bors bors bot merged commit c61925b into containers:master Mar 25, 2020
@TomSweeneyRedHat TomSweeneyRedHat deleted the dev/tsweeney/cvebuild branch April 4, 2020 17:19
bors bot added a commit that referenced this pull request Aug 31, 2020
2574: [release-1.11-rhel] fix potential CVE in tarfile w/ symlink r=rhatdan a=nalind

#### What type of PR is this?

/kind bug

#### What this PR does / why we need it:

This cherry-picks the fix from #2245 to fix CVE-2020-10696.

#### How to verify it

#### Which issue(s) this PR fixes:

CVE-2020=10696

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```
None
```

Co-authored-by: TomSweeneyRedHat <tsweeney@redhat.com>
Co-authored-by: Nalin Dahyabhai <nalin@redhat.com>
bors bot added a commit that referenced this pull request Aug 31, 2020
2574: [release-1.11-rhel] fix potential CVE in tarfile w/ symlink r=rhatdan a=nalind

#### What type of PR is this?

/kind bug

#### What this PR does / why we need it:

This cherry-picks the fix from #2245 to fix CVE-2020-10696.

#### How to verify it

#### Which issue(s) this PR fixes:

CVE-2020=10696

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```
None
```

Co-authored-by: TomSweeneyRedHat <tsweeney@redhat.com>
Co-authored-by: Nalin Dahyabhai <nalin@redhat.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants