Fix #3091 enforce all outgoing tar files to use PAX#3141
Merged
justincormack merged 1 commit intolinuxkit:masterfrom Jul 29, 2018
Merged
Fix #3091 enforce all outgoing tar files to use PAX#3141justincormack merged 1 commit intolinuxkit:masterfrom
justincormack merged 1 commit intolinuxkit:masterfrom
Conversation
This was referenced Jul 27, 2018
Member
|
I think you should set the header format in each branch here that writes a header, as it is set when creating the first header, and one of the other branches might come first, eg the |
While processing the content of a tar image, linuxkit's moby tool is blindly reusing the original tar format. Moreover it locates the files under a new prefix, so if the original file was stored as USTAR in the original archive, the filename length and new prefix could be greater than the USTAR name limit leading to a fatal error. The fix is to always enforce PAX format on all copied files from the original image archive. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
f670f5a to
7a7f5f6
Compare
Contributor
Author
|
@justincormack, you're definitely right. |
justincormack
approved these changes
Jul 29, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #3091
- What I did
While processing the content of a tar image, linuxkit's moby tool was
blindly reusing the original tar format.
Moreover it locates the file under a new prefix, so if the original
file was stored as USTAR in the original archive, the filename length
and new prefix could be greater than the USTAR limit leading
to a fatal error.
- How I did it
The fix is to always enforce PAX format on all copied files from the
original image archive.
- How to verify it
Use the following minimal yaml:
- Description for the changelog
Prevent fatal error while processing incoming USTAR formatted tar container image
- A picture of a cute animal (not mandatory but encouraged)